@@ -7,8 +7,11 @@ LL | FOO => {}
7
7
error: unreachable pattern
8
8
--> $DIR/consts-opaque.rs:32:9
9
9
|
10
+ LL | FOO => {}
11
+ | --- matches any value
12
+ LL |
10
13
LL | _ => {} // should not be emitting unreachable warning
11
- | ^
14
+ | ^ unreachable pattern
12
15
|
13
16
note: the lint level is defined here
14
17
--> $DIR/consts-opaque.rs:6:9
@@ -25,8 +28,11 @@ LL | FOO_REF => {}
25
28
error: unreachable pattern
26
29
--> $DIR/consts-opaque.rs:39:9
27
30
|
31
+ LL | FOO_REF => {}
32
+ | ------- matches any value
33
+ LL |
28
34
LL | Foo(_) => {} // should not be emitting unreachable warning
29
- | ^^^^^^
35
+ | ^^^^^^ unreachable pattern
30
36
31
37
warning: to use a constant of type `Foo` in a pattern, `Foo` must be annotated with `#[derive(PartialEq, Eq)]`
32
38
--> $DIR/consts-opaque.rs:45:9
@@ -70,15 +76,18 @@ LL | BAR => {}
70
76
error: unreachable pattern
71
77
--> $DIR/consts-opaque.rs:63:9
72
78
|
79
+ LL | BAR => {}
80
+ | --- matches any value
81
+ LL |
73
82
LL | Bar => {} // should not be emitting unreachable warning
74
- | ^^^
83
+ | ^^^ unreachable pattern
75
84
76
85
error: unreachable pattern
77
86
--> $DIR/consts-opaque.rs:65:9
78
87
|
79
- LL | Bar => {} // should not be emitting unreachable warning
88
+ LL | BAR => {}
80
89
| --- matches any value
81
- LL |
90
+ ...
82
91
LL | _ => {}
83
92
| ^ unreachable pattern
84
93
@@ -97,14 +106,20 @@ LL | BAR => {} // should not be emitting unreachable warning
97
106
error: unreachable pattern
98
107
--> $DIR/consts-opaque.rs:72:9
99
108
|
109
+ LL | BAR => {}
110
+ | --- matches any value
111
+ LL |
100
112
LL | BAR => {} // should not be emitting unreachable warning
101
- | ^^^
113
+ | ^^^ unreachable pattern
102
114
103
115
error: unreachable pattern
104
116
--> $DIR/consts-opaque.rs:75:9
105
117
|
118
+ LL | BAR => {}
119
+ | --- matches any value
120
+ ...
106
121
LL | _ => {} // should not be emitting unreachable warning
107
- | ^
122
+ | ^ unreachable pattern
108
123
109
124
error: to use a constant of type `Baz` in a pattern, `Baz` must be annotated with `#[derive(PartialEq, Eq)]`
110
125
--> $DIR/consts-opaque.rs:80:9
@@ -115,14 +130,20 @@ LL | BAZ => {}
115
130
error: unreachable pattern
116
131
--> $DIR/consts-opaque.rs:82:9
117
132
|
133
+ LL | BAZ => {}
134
+ | --- matches any value
135
+ LL |
118
136
LL | Baz::Baz1 => {} // should not be emitting unreachable warning
119
- | ^^^^^^^^^
137
+ | ^^^^^^^^^ unreachable pattern
120
138
121
139
error: unreachable pattern
122
140
--> $DIR/consts-opaque.rs:84:9
123
141
|
142
+ LL | BAZ => {}
143
+ | --- matches any value
144
+ ...
124
145
LL | _ => {}
125
- | ^
146
+ | ^ unreachable pattern
126
147
127
148
error: to use a constant of type `Baz` in a pattern, `Baz` must be annotated with `#[derive(PartialEq, Eq)]`
128
149
--> $DIR/consts-opaque.rs:90:9
@@ -133,8 +154,11 @@ LL | BAZ => {}
133
154
error: unreachable pattern
134
155
--> $DIR/consts-opaque.rs:92:9
135
156
|
157
+ LL | BAZ => {}
158
+ | --- matches any value
159
+ LL |
136
160
LL | _ => {}
137
- | ^
161
+ | ^ unreachable pattern
138
162
139
163
error: to use a constant of type `Baz` in a pattern, `Baz` must be annotated with `#[derive(PartialEq, Eq)]`
140
164
--> $DIR/consts-opaque.rs:97:9
@@ -145,20 +169,28 @@ LL | BAZ => {}
145
169
error: unreachable pattern
146
170
--> $DIR/consts-opaque.rs:99:9
147
171
|
172
+ LL | BAZ => {}
173
+ | --- matches any value
174
+ LL |
148
175
LL | Baz::Baz2 => {} // should not be emitting unreachable warning
149
- | ^^^^^^^^^
176
+ | ^^^^^^^^^ unreachable pattern
150
177
151
178
error: unreachable pattern
152
179
--> $DIR/consts-opaque.rs:101:9
153
180
|
181
+ LL | BAZ => {}
182
+ | --- matches any value
183
+ ...
154
184
LL | _ => {} // should not be emitting unreachable warning
155
- | ^
185
+ | ^ unreachable pattern
156
186
157
187
error: unreachable pattern
158
188
--> $DIR/consts-opaque.rs:127:9
159
189
|
190
+ LL | Wrap(_) => {}
191
+ | ------- matches any value
160
192
LL | WRAPQUUX => {} // detected unreachable because we do inspect the `Wrap` layer
161
- | ^^^^^^^^
193
+ | ^^^^^^^^ unreachable pattern
162
194
163
195
error: unreachable pattern
164
196
--> $DIR/consts-opaque.rs:141:9
0 commit comments