@@ -28,22 +28,32 @@ error: unreachable pattern
28
28
LL | Foo(_) => {} // should not be emitting unreachable warning
29
29
| ^^^^^^
30
30
31
+ warning: to use a constant of type `Foo` in a pattern, `Foo` must be annotated with `#[derive(PartialEq, Eq)]`
32
+ --> $DIR/consts-opaque.rs:49:9
33
+ |
34
+ LL | FOO_REF_REF => {}
35
+ | ^^^^^^^^^^^
36
+ |
37
+ = note: `#[warn(indirect_structural_match)]` on by default
38
+ = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
39
+ = note: for more information, see issue #62411 <https://github.com/rust-lang/rust/issues/62411>
40
+
31
41
error: to use a constant of type `Bar` in a pattern, `Bar` must be annotated with `#[derive(PartialEq, Eq)]`
32
- --> $DIR/consts-opaque.rs:55 :9
42
+ --> $DIR/consts-opaque.rs:57 :9
33
43
|
34
44
LL | BAR => {} // should not be emitting unreachable warning
35
45
| ^^^
36
46
37
47
error: unreachable pattern
38
- --> $DIR/consts-opaque.rs:55 :9
48
+ --> $DIR/consts-opaque.rs:57 :9
39
49
|
40
50
LL | Bar => {}
41
51
| --- matches any value
42
52
LL | BAR => {} // should not be emitting unreachable warning
43
53
| ^^^ unreachable pattern
44
54
45
55
error: unreachable pattern
46
- --> $DIR/consts-opaque.rs:58 :9
56
+ --> $DIR/consts-opaque.rs:60 :9
47
57
|
48
58
LL | Bar => {}
49
59
| --- matches any value
@@ -52,19 +62,19 @@ LL | _ => {}
52
62
| ^ unreachable pattern
53
63
54
64
error: to use a constant of type `Bar` in a pattern, `Bar` must be annotated with `#[derive(PartialEq, Eq)]`
55
- --> $DIR/consts-opaque.rs:63 :9
65
+ --> $DIR/consts-opaque.rs:65 :9
56
66
|
57
67
LL | BAR => {}
58
68
| ^^^
59
69
60
70
error: unreachable pattern
61
- --> $DIR/consts-opaque.rs:65 :9
71
+ --> $DIR/consts-opaque.rs:67 :9
62
72
|
63
73
LL | Bar => {} // should not be emitting unreachable warning
64
74
| ^^^
65
75
66
76
error: unreachable pattern
67
- --> $DIR/consts-opaque.rs:67 :9
77
+ --> $DIR/consts-opaque.rs:69 :9
68
78
|
69
79
LL | Bar => {} // should not be emitting unreachable warning
70
80
| --- matches any value
@@ -73,76 +83,76 @@ LL | _ => {}
73
83
| ^ unreachable pattern
74
84
75
85
error: to use a constant of type `Bar` in a pattern, `Bar` must be annotated with `#[derive(PartialEq, Eq)]`
76
- --> $DIR/consts-opaque.rs:72 :9
86
+ --> $DIR/consts-opaque.rs:74 :9
77
87
|
78
88
LL | BAR => {}
79
89
| ^^^
80
90
81
91
error: to use a constant of type `Bar` in a pattern, `Bar` must be annotated with `#[derive(PartialEq, Eq)]`
82
- --> $DIR/consts-opaque.rs:74 :9
92
+ --> $DIR/consts-opaque.rs:76 :9
83
93
|
84
94
LL | BAR => {} // should not be emitting unreachable warning
85
95
| ^^^
86
96
87
97
error: unreachable pattern
88
- --> $DIR/consts-opaque.rs:74 :9
98
+ --> $DIR/consts-opaque.rs:76 :9
89
99
|
90
100
LL | BAR => {} // should not be emitting unreachable warning
91
101
| ^^^
92
102
93
103
error: unreachable pattern
94
- --> $DIR/consts-opaque.rs:77 :9
104
+ --> $DIR/consts-opaque.rs:79 :9
95
105
|
96
106
LL | _ => {} // should not be emitting unreachable warning
97
107
| ^
98
108
99
109
error: to use a constant of type `Baz` in a pattern, `Baz` must be annotated with `#[derive(PartialEq, Eq)]`
100
- --> $DIR/consts-opaque.rs:82 :9
110
+ --> $DIR/consts-opaque.rs:84 :9
101
111
|
102
112
LL | BAZ => {}
103
113
| ^^^
104
114
105
115
error: unreachable pattern
106
- --> $DIR/consts-opaque.rs:84 :9
116
+ --> $DIR/consts-opaque.rs:86 :9
107
117
|
108
118
LL | Baz::Baz1 => {} // should not be emitting unreachable warning
109
119
| ^^^^^^^^^
110
120
111
121
error: unreachable pattern
112
- --> $DIR/consts-opaque.rs:86 :9
122
+ --> $DIR/consts-opaque.rs:88 :9
113
123
|
114
124
LL | _ => {}
115
125
| ^
116
126
117
127
error: to use a constant of type `Baz` in a pattern, `Baz` must be annotated with `#[derive(PartialEq, Eq)]`
118
- --> $DIR/consts-opaque.rs:92 :9
128
+ --> $DIR/consts-opaque.rs:94 :9
119
129
|
120
130
LL | BAZ => {}
121
131
| ^^^
122
132
123
133
error: unreachable pattern
124
- --> $DIR/consts-opaque.rs:94 :9
134
+ --> $DIR/consts-opaque.rs:96 :9
125
135
|
126
136
LL | _ => {}
127
137
| ^
128
138
129
139
error: to use a constant of type `Baz` in a pattern, `Baz` must be annotated with `#[derive(PartialEq, Eq)]`
130
- --> $DIR/consts-opaque.rs:99 :9
140
+ --> $DIR/consts-opaque.rs:101 :9
131
141
|
132
142
LL | BAZ => {}
133
143
| ^^^
134
144
135
145
error: unreachable pattern
136
- --> $DIR/consts-opaque.rs:101 :9
146
+ --> $DIR/consts-opaque.rs:103 :9
137
147
|
138
148
LL | Baz::Baz2 => {} // should not be emitting unreachable warning
139
149
| ^^^^^^^^^
140
150
141
151
error: unreachable pattern
142
- --> $DIR/consts-opaque.rs:103 :9
152
+ --> $DIR/consts-opaque.rs:105 :9
143
153
|
144
154
LL | _ => {} // should not be emitting unreachable warning
145
155
| ^
146
156
147
- error: aborting due to 22 previous errors
157
+ error: aborting due to 22 previous errors; 1 warning emitted
148
158
0 commit comments