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