mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 06:51:58 +00:00
13 lines
417 B
Rust
13 lines
417 B
Rust
fn main() {
|
|
for<'a> |x: &'a u8| *x + 1;
|
|
//~^ ERROR `for<...>` binders for closures are experimental
|
|
//~^^ ERROR implicit types in closure signatures are forbidden when `for<...>` is present
|
|
}
|
|
|
|
enum Foo { Bar }
|
|
fn foo(x: impl Iterator<Item = Foo>) {
|
|
for <Foo>::Bar in x {}
|
|
//~^ ERROR expected one of `const`, `move`, `static`, `|`
|
|
//~^^ ERROR `for<...>` binders for closures are experimental
|
|
}
|