about summary refs log tree commit diff
path: root/src/test/ui/parser/struct-literal-in-while.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/parser/struct-literal-in-while.rs')
-rw-r--r--src/test/ui/parser/struct-literal-in-while.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/test/ui/parser/struct-literal-in-while.rs b/src/test/ui/parser/struct-literal-in-while.rs
index 561cdcea089..5000ce85b7f 100644
--- a/src/test/ui/parser/struct-literal-in-while.rs
+++ b/src/test/ui/parser/struct-literal-in-while.rs
@@ -9,10 +9,9 @@ impl Foo {
 }
 
 fn main() {
-    while Foo { //~ ERROR expected value, found struct `Foo`
-        x: 3    //~ ERROR expected type, found `3`
-    }.hi() { //~ ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `{`
-             //~| ERROR no method named `hi` found for type `()` in the current scope
+    while Foo { //~ ERROR struct literals are not allowed here
+        x: 3
+    }.hi() {
         println!("yo");
     }
 }