File tree 1 file changed +6
-2
lines changed
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 10
10
11
11
// Can't use unit struct as enum pattern
12
12
13
+ #![ feature( rustc_attrs) ]
14
+ // remove prior feature after warning cycle and promoting warnings to errors
13
15
#![ feature( braced_empty_structs) ]
14
16
15
17
struct Empty1 ;
@@ -18,7 +20,9 @@ enum E {
18
20
Empty2
19
21
}
20
22
21
- fn main ( ) {
23
+ // remove attribute after warning cycle and promoting warnings to errors
24
+ #[ rustc_error]
25
+ fn main ( ) { //~ ERROR: compilation successful
22
26
let e1 = Empty1 ;
23
27
let e2 = E :: Empty2 ;
24
28
@@ -27,7 +31,7 @@ fn main() {
27
31
// Empty1() => () // ERROR `Empty1` does not name a tuple variant or a tuple struct
28
32
// }
29
33
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
31
35
}
32
36
// Rejected by parser as yet
33
37
// match e2 {
You can’t perform that action at this time.
0 commit comments