mirror of
https://github.com/rust-lang/rust.git
synced 2025-11-10 03:50:17 +00:00
22 lines
893 B
Plaintext
22 lines
893 B
Plaintext
warning: the feature `precise_capturing` is incomplete and may not be safe to use and/or cause compiler crashes
|
|
--> $DIR/forgot-to-capture-const.rs:1:12
|
|
|
|
|
LL | #![feature(precise_capturing)]
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
|
= note: see issue #123432 <https://github.com/rust-lang/rust/issues/123432> for more information
|
|
= note: `#[warn(incomplete_features)]` on by default
|
|
|
|
error: `impl Trait` must mention all const parameters in scope in `use<...>`
|
|
--> $DIR/forgot-to-capture-const.rs:4:34
|
|
|
|
|
LL | fn constant<const C: usize>() -> impl use<> Sized {}
|
|
| -------------- ^^^^^^^^^^^^^^^^
|
|
| |
|
|
| const parameter is implicitly captured by this `impl Trait`
|
|
|
|
|
= note: currently, all const parameters are required to be mentioned in the precise captures list
|
|
|
|
error: aborting due to 1 previous error; 1 warning emitted
|
|
|