Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Regression test for issue #127424

fn bar() -> impl Into<
[u8; {
//~^ ERROR mismatched types [E0308]
let _ = for<'a, 'b> |x: &'a &'a Vec<&'b u32>, b: bool| -> &'a Vec<&'b u32> { *x };
//~^ ERROR `for<...>` binders for closures are experimental [E0658]
}],
> {
[89]
}

fn main() {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
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`.
Loading