File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 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
1517struct 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 {
You can’t perform that action at this time.
0 commit comments