]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/parser/struct-literal-in-if.rs
Stabilize `param_attrs` in Rust 1.39.0
[rust.git] / src / test / ui / parser / struct-literal-in-if.rs
index 362a71c577fc94a20f86448dd640e78b7aa07d60..2ce2c8f189944d5441383d4b27c8047360bb7eae 100644 (file)
@@ -9,9 +9,9 @@ fn hi(&self) -> bool {
 }
 
 fn main() {
-    if Foo { //~ ERROR expected value, found struct `Foo`
-        x: 3    //~ ERROR expected type, found `3`
-    }.hi() { //~ ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `{`
+    if Foo { //~ ERROR struct literals are not allowed here
+        x: 3
+    }.hi() {
         println!("yo");
     }
 }