1
1
error: to use a constant of type `Foo` in a pattern, `Foo` must be annotated with `#[derive(PartialEq, Eq)]`
2
- --> $DIR/consts-opaque.rs:34 :9
2
+ --> $DIR/consts-opaque.rs:30 :9
3
3
|
4
4
LL | FOO => {}
5
5
| ^^^
6
6
7
7
error: unreachable pattern
8
- --> $DIR/consts-opaque.rs:36 :9
8
+ --> $DIR/consts-opaque.rs:32 :9
9
9
|
10
10
LL | _ => {} // should not be emitting unreachable warning
11
11
| ^
@@ -17,19 +17,19 @@ LL | #![deny(unreachable_patterns)]
17
17
| ^^^^^^^^^^^^^^^^^^^^
18
18
19
19
error: to use a constant of type `Foo` in a pattern, `Foo` must be annotated with `#[derive(PartialEq, Eq)]`
20
- --> $DIR/consts-opaque.rs:41 :9
20
+ --> $DIR/consts-opaque.rs:37 :9
21
21
|
22
22
LL | FOO_REF => {}
23
23
| ^^^^^^^
24
24
25
25
error: unreachable pattern
26
- --> $DIR/consts-opaque.rs:43 :9
26
+ --> $DIR/consts-opaque.rs:39 :9
27
27
|
28
28
LL | Foo(_) => {} // should not be emitting unreachable warning
29
29
| ^^^^^^
30
30
31
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
32
+ --> $DIR/consts-opaque.rs:45 :9
33
33
|
34
34
LL | FOO_REF_REF => {}
35
35
| ^^^^^^^^^^^
@@ -39,21 +39,21 @@ LL | FOO_REF_REF => {}
39
39
= note: for more information, see issue #62411 <https://github.com/rust-lang/rust/issues/62411>
40
40
41
41
error: to use a constant of type `Bar` in a pattern, `Bar` must be annotated with `#[derive(PartialEq, Eq)]`
42
- --> $DIR/consts-opaque.rs:57 :9
42
+ --> $DIR/consts-opaque.rs:53 :9
43
43
|
44
44
LL | BAR => {} // should not be emitting unreachable warning
45
45
| ^^^
46
46
47
47
error: unreachable pattern
48
- --> $DIR/consts-opaque.rs:57 :9
48
+ --> $DIR/consts-opaque.rs:53 :9
49
49
|
50
50
LL | Bar => {}
51
51
| --- matches any value
52
52
LL | BAR => {} // should not be emitting unreachable warning
53
53
| ^^^ unreachable pattern
54
54
55
55
error: unreachable pattern
56
- --> $DIR/consts-opaque.rs:60 :9
56
+ --> $DIR/consts-opaque.rs:56 :9
57
57
|
58
58
LL | Bar => {}
59
59
| --- matches any value
@@ -62,19 +62,19 @@ LL | _ => {}
62
62
| ^ unreachable pattern
63
63
64
64
error: to use a constant of type `Bar` in a pattern, `Bar` must be annotated with `#[derive(PartialEq, Eq)]`
65
- --> $DIR/consts-opaque.rs:65 :9
65
+ --> $DIR/consts-opaque.rs:61 :9
66
66
|
67
67
LL | BAR => {}
68
68
| ^^^
69
69
70
70
error: unreachable pattern
71
- --> $DIR/consts-opaque.rs:67 :9
71
+ --> $DIR/consts-opaque.rs:63 :9
72
72
|
73
73
LL | Bar => {} // should not be emitting unreachable warning
74
74
| ^^^
75
75
76
76
error: unreachable pattern
77
- --> $DIR/consts-opaque.rs:69 :9
77
+ --> $DIR/consts-opaque.rs:65 :9
78
78
|
79
79
LL | Bar => {} // should not be emitting unreachable warning
80
80
| --- matches any value
@@ -83,76 +83,88 @@ LL | _ => {}
83
83
| ^ unreachable pattern
84
84
85
85
error: to use a constant of type `Bar` in a pattern, `Bar` must be annotated with `#[derive(PartialEq, Eq)]`
86
- --> $DIR/consts-opaque.rs:74 :9
86
+ --> $DIR/consts-opaque.rs:70 :9
87
87
|
88
88
LL | BAR => {}
89
89
| ^^^
90
90
91
91
error: to use a constant of type `Bar` in a pattern, `Bar` must be annotated with `#[derive(PartialEq, Eq)]`
92
- --> $DIR/consts-opaque.rs:76 :9
92
+ --> $DIR/consts-opaque.rs:72 :9
93
93
|
94
94
LL | BAR => {} // should not be emitting unreachable warning
95
95
| ^^^
96
96
97
97
error: unreachable pattern
98
- --> $DIR/consts-opaque.rs:76 :9
98
+ --> $DIR/consts-opaque.rs:72 :9
99
99
|
100
100
LL | BAR => {} // should not be emitting unreachable warning
101
101
| ^^^
102
102
103
103
error: unreachable pattern
104
- --> $DIR/consts-opaque.rs:79 :9
104
+ --> $DIR/consts-opaque.rs:75 :9
105
105
|
106
106
LL | _ => {} // should not be emitting unreachable warning
107
107
| ^
108
108
109
109
error: to use a constant of type `Baz` in a pattern, `Baz` must be annotated with `#[derive(PartialEq, Eq)]`
110
- --> $DIR/consts-opaque.rs:84 :9
110
+ --> $DIR/consts-opaque.rs:80 :9
111
111
|
112
112
LL | BAZ => {}
113
113
| ^^^
114
114
115
115
error: unreachable pattern
116
- --> $DIR/consts-opaque.rs:86 :9
116
+ --> $DIR/consts-opaque.rs:82 :9
117
117
|
118
118
LL | Baz::Baz1 => {} // should not be emitting unreachable warning
119
119
| ^^^^^^^^^
120
120
121
121
error: unreachable pattern
122
- --> $DIR/consts-opaque.rs:88 :9
122
+ --> $DIR/consts-opaque.rs:84 :9
123
123
|
124
124
LL | _ => {}
125
125
| ^
126
126
127
127
error: to use a constant of type `Baz` in a pattern, `Baz` must be annotated with `#[derive(PartialEq, Eq)]`
128
- --> $DIR/consts-opaque.rs:94 :9
128
+ --> $DIR/consts-opaque.rs:90 :9
129
129
|
130
130
LL | BAZ => {}
131
131
| ^^^
132
132
133
133
error: unreachable pattern
134
- --> $DIR/consts-opaque.rs:96 :9
134
+ --> $DIR/consts-opaque.rs:92 :9
135
135
|
136
136
LL | _ => {}
137
137
| ^
138
138
139
139
error: to use a constant of type `Baz` in a pattern, `Baz` must be annotated with `#[derive(PartialEq, Eq)]`
140
- --> $DIR/consts-opaque.rs:101 :9
140
+ --> $DIR/consts-opaque.rs:97 :9
141
141
|
142
142
LL | BAZ => {}
143
143
| ^^^
144
144
145
145
error: unreachable pattern
146
- --> $DIR/consts-opaque.rs:103 :9
146
+ --> $DIR/consts-opaque.rs:99 :9
147
147
|
148
148
LL | Baz::Baz2 => {} // should not be emitting unreachable warning
149
149
| ^^^^^^^^^
150
150
151
151
error: unreachable pattern
152
- --> $DIR/consts-opaque.rs:105 :9
152
+ --> $DIR/consts-opaque.rs:101 :9
153
153
|
154
154
LL | _ => {} // should not be emitting unreachable warning
155
155
| ^
156
156
157
- error: aborting due to 22 previous errors; 1 warning emitted
157
+ error: unreachable pattern
158
+ --> $DIR/consts-opaque.rs:127:9
159
+ |
160
+ LL | WRAPQUUX => {} // detected unreachable because we do inspect the `Wrap` layer
161
+ | ^^^^^^^^
162
+
163
+ error: unreachable pattern
164
+ --> $DIR/consts-opaque.rs:141:9
165
+ |
166
+ LL | WHOKNOWSQUUX => {} // detected unreachable because we do inspect the `WhoKnows` layer
167
+ | ^^^^^^^^^^^^
168
+
169
+ error: aborting due to 24 previous errors; 1 warning emitted
158
170
0 commit comments