blob: 7bac7b6ec4f0cee8a79b7ae5b73871142fbf865c [file] [log] [blame] [edit]
//@ edition:2015
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 `move`, `static`, `use`, `|`
//~^^ ERROR `for<...>` binders for closures are experimental
}