about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFelix S. Klock II <pnkfelix@pnkfx.org>2016-01-07 01:03:36 +0100
committerFelix S. Klock II <pnkfelix@pnkfx.org>2016-01-07 21:56:04 +0100
commit8aed830ee3a8b6cbdbe8e401a5a40afacfba96f9 (patch)
treeb753398b03845dbe57fa6580ecb0cff13776ea63
parentd4039c5d402033e28744b91b95ea1c560fa4ab0b (diff)
downloadrust-8aed830ee3a8b6cbdbe8e401a5a40afacfba96f9.tar.gz
rust-8aed830ee3a8b6cbdbe8e401a5a40afacfba96f9.zip
updated test to reflect loosening of check (for issue #30379).
-rw-r--r--src/test/compile-fail/empty-struct-unit-pat.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/test/compile-fail/empty-struct-unit-pat.rs b/src/test/compile-fail/empty-struct-unit-pat.rs
index 6cb9a3f007f..7e13f539bb0 100644
--- a/src/test/compile-fail/empty-struct-unit-pat.rs
+++ b/src/test/compile-fail/empty-struct-unit-pat.rs
@@ -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 {