Skip to content

Commit 8aed830

Browse files
committed
updated test to reflect loosening of check (for issue rust-lang#30379).
1 parent d4039c5 commit 8aed830

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/test/compile-fail/empty-struct-unit-pat.rs

+6-2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
// Can't use unit struct as enum pattern
1212

13+
#![feature(rustc_attrs)]
14+
// remove prior feature after warning cycle and promoting warnings to errors
1315
#![feature(braced_empty_structs)]
1416

1517
struct Empty1;
@@ -18,7 +20,9 @@ enum E {
1820
Empty2
1921
}
2022

21-
fn main() {
23+
// remove attribute after warning cycle and promoting warnings to errors
24+
#[rustc_error]
25+
fn main() { //~ ERROR: compilation successful
2226
let e1 = Empty1;
2327
let e2 = E::Empty2;
2428

@@ -27,7 +31,7 @@ fn main() {
2731
// Empty1() => () // ERROR `Empty1` does not name a tuple variant or a tuple struct
2832
// }
2933
match e1 {
30-
Empty1(..) => () //~ ERROR `Empty1` does not name a tuple variant or a tuple struct
34+
Empty1(..) => () //~ WARN `Empty1` does not name a tuple variant or a tuple struct
3135
}
3236
// Rejected by parser as yet
3337
// match e2 {

0 commit comments

Comments
 (0)