]> git.lizzy.rs Git - rust.git/commitdiff
updated test to reflect loosening of check (for issue #30379).
authorFelix S. Klock II <pnkfelix@pnkfx.org>
Thu, 7 Jan 2016 00:03:36 +0000 (01:03 +0100)
committerFelix S. Klock II <pnkfelix@pnkfx.org>
Thu, 7 Jan 2016 20:56:04 +0000 (21:56 +0100)
src/test/compile-fail/empty-struct-unit-pat.rs

index 6cb9a3f007f0c5e628e6fd8983e6e548255fad23..7e13f539bb0438c37640980e6cea60f34d4fbb30 100644 (file)
@@ -10,6 +10,8 @@
 
 // Can't use unit struct as enum pattern
 
+#![feature(rustc_attrs)]
+// remove prior feature after warning cycle and promoting warnings to errors
 #![feature(braced_empty_structs)]
 
 struct Empty1;
@@ -18,7 +20,9 @@ enum E {
     Empty2
 }
 
-fn main() {
+// remove attribute after warning cycle and promoting warnings to errors
+#[rustc_error]
+fn main() { //~ ERROR: compilation successful
     let e1 = Empty1;
     let e2 = E::Empty2;
 
@@ -27,7 +31,7 @@ fn main() {
     //     Empty1() => () // ERROR `Empty1` does not name a tuple variant or a tuple struct
     // }
     match e1 {
-        Empty1(..) => () //~ ERROR `Empty1` does not name a tuple variant or a tuple struct
+        Empty1(..) => () //~ WARN `Empty1` does not name a tuple variant or a tuple struct
     }
     // Rejected by parser as yet
     // match e2 {