Skip to content

Commit

Permalink
updated test to reflect loosening of check (for issue #30379).
Browse files Browse the repository at this point in the history
  • Loading branch information
pnkfelix committed Jan 7, 2016
1 parent d4039c5 commit 8aed830
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/test/compile-fail/empty-struct-unit-pat.rs
Expand Up @@ -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;
Expand All @@ -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;

Expand All @@ -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 {
Expand Down

0 comments on commit 8aed830

Please sign in to comment.