2020-03-21 07:32:55 +00:00
|
|
|
fn main() {
|
|
|
|
for<'a> |x: &'a u8| *x + 1;
|
2022-07-12 09:34:24 +00:00
|
|
|
//~^ ERROR `for<...>` binders for closures are experimental
|
|
|
|
//~^^ ERROR implicit types in closure signatures are forbidden when `for<...>` is present
|
2020-03-21 07:32:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
enum Foo { Bar }
|
|
|
|
fn foo(x: impl Iterator<Item = Foo>) {
|
|
|
|
for <Foo>::Bar in x {}
|
2022-12-20 16:15:55 +00:00
|
|
|
//~^ ERROR expected one of `const`, `move`, `static`, `|`
|
2022-06-02 16:15:41 +00:00
|
|
|
//~^^ ERROR `for<...>` binders for closures are experimental
|
2020-03-21 07:32:55 +00:00
|
|
|
}
|