]> 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 f69b9b1cbccb49b153890e970a8fb5e37c765b7b..2ce2c8f189944d5441383d4b27c8047360bb7eae 100644 (file)
@@ -1,5 +1,3 @@
-// compile-flags: -Z parse-only
-
 struct Foo {
     x: isize,
 }
@@ -11,9 +9,9 @@ fn hi(&self) -> bool {
 }
 
 fn main() {
-    if 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");
     }
 }