]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/parser/struct-literal-in-while.rs
Add 'compiler/rustc_codegen_cranelift/' from commit '793d26047f994e23415f8f6bb5686ff2...
[rust.git] / src / test / ui / parser / struct-literal-in-while.rs
index 561cdcea089a542fa0ac102005d94cf245ae0838..5000ce85b7f7150e08865b7f3078a0b75fd202e2 100644 (file)
@@ -9,10 +9,9 @@ fn hi(&self) -> bool {
 }
 
 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");
     }
 }