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