summaryrefslogtreecommitdiffstats
path: root/tests/ui/parser/recover-quantified-closure.rs
blob: 10af39b70074882ef906f592ac57975f4df7beba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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`, `|`
    //~^^ ERROR `for<...>` binders for closures are experimental
}