]> git.proxmox.com Git - rustc.git/blobdiff - src/test/ui/parser/struct-literal-in-if.rs
Update unsuspicious file list
[rustc.git] / src / test / ui / parser / struct-literal-in-if.rs
index db6a360a5675a46334df05afb095e4367da1df73..2ce2c8f189944d5441383d4b27c8047360bb7eae 100644 (file)
@@ -1,15 +1,3 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Z parse-only
-
 struct Foo {
     x: isize,
 }
@@ -21,9 +9,9 @@ impl Foo {
 }
 
 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");
     }
 }