rust/tests/ui/parser/recover-quantified-closure.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

13 lines
408 B
Rust
Raw Normal View History

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`, `|`
2022-06-02 16:15:41 +00:00
//~^^ ERROR `for<...>` binders for closures are experimental
}