rust/tests/ui/const-generics/generic_const_exprs/const-generics-closure.stderr

27 lines
1010 B
Plaintext

error[E0658]: `for<...>` binders for closures are experimental
--> $DIR/const-generics-closure.rs:6:17
|
LL | let _ = for<'a, 'b> |x: &'a &'a Vec<&'b u32>, b: bool| -> &'a Vec<&'b u32> { *x };
| ^^^^^^^^^^^
|
= note: see issue #97362 <https://github.com/rust-lang/rust/issues/97362> for more information
= help: add `#![feature(closure_lifetime_binder)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
= help: consider removing `for<...>`
error[E0308]: mismatched types
--> $DIR/const-generics-closure.rs:4:10
|
LL | [u8; {
| __________^
LL | |
LL | | let _ = for<'a, 'b> |x: &'a &'a Vec<&'b u32>, b: bool| -> &'a Vec<&'b u32> { *x };
LL | |
LL | | }],
| |_____^ expected `usize`, found `()`
error: aborting due to 2 previous errors
Some errors have detailed explanations: E0308, E0658.
For more information about an error, try `rustc --explain E0308`.