diff options
Diffstat (limited to 'tests/ui/parser/struct-literal-in-while.rs')
-rw-r--r-- | tests/ui/parser/struct-literal-in-while.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/ui/parser/struct-literal-in-while.rs b/tests/ui/parser/struct-literal-in-while.rs index 5000ce85b..86931f788 100644 --- a/tests/ui/parser/struct-literal-in-while.rs +++ b/tests/ui/parser/struct-literal-in-while.rs @@ -14,4 +14,9 @@ fn main() { }.hi() { println!("yo"); } + while let true = Foo { //~ ERROR struct literals are not allowed here + x: 3 + }.hi() { + println!("yo"); + } } |