diff options
Diffstat (limited to 'tests/ui/parser/recover/recover-quantified-closure.rs')
-rw-r--r-- | tests/ui/parser/recover/recover-quantified-closure.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/ui/parser/recover/recover-quantified-closure.rs b/tests/ui/parser/recover/recover-quantified-closure.rs new file mode 100644 index 000000000..10af39b70 --- /dev/null +++ b/tests/ui/parser/recover/recover-quantified-closure.rs @@ -0,0 +1,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 +} |