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:30:9
7 error: unreachable pattern
8 --> $DIR/consts-opaque.rs:32:9
11 | --- matches any value
13 LL | _ => {} // should not be emitting unreachable warning
14 | ^ unreachable pattern
16 note: the lint level is defined here
17 --> $DIR/consts-opaque.rs:6:9
19 LL | #![deny(unreachable_patterns)]
20 | ^^^^^^^^^^^^^^^^^^^^
22 error: to use a constant of type `Foo` in a pattern, `Foo` must be annotated with `#[derive(PartialEq, Eq)]`
23 --> $DIR/consts-opaque.rs:37:9
28 error: unreachable pattern
29 --> $DIR/consts-opaque.rs:39:9
32 | ------- matches any value
34 LL | Foo(_) => {} // should not be emitting unreachable warning
35 | ^^^^^^ unreachable pattern
37 warning: to use a constant of type `Foo` in a pattern, `Foo` must be annotated with `#[derive(PartialEq, Eq)]`
38 --> $DIR/consts-opaque.rs:45:9
40 LL | FOO_REF_REF => {}
43 = note: `#[warn(indirect_structural_match)]` on by default
44 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
45 = note: for more information, see issue #62411 <https://github.com/rust-lang/rust/issues/62411>
47 error: to use a constant of type `Bar` in a pattern, `Bar` must be annotated with `#[derive(PartialEq, Eq)]`
48 --> $DIR/consts-opaque.rs:53:9
50 LL | BAR => {} // should not be emitting unreachable warning
53 error: unreachable pattern
54 --> $DIR/consts-opaque.rs:53:9
57 | --- matches any value
58 LL | BAR => {} // should not be emitting unreachable warning
59 | ^^^ unreachable pattern
61 error: unreachable pattern
62 --> $DIR/consts-opaque.rs:56:9
65 | --- matches any value
68 | ^ unreachable pattern
70 error: to use a constant of type `Bar` in a pattern, `Bar` must be annotated with `#[derive(PartialEq, Eq)]`
71 --> $DIR/consts-opaque.rs:61:9
76 error: unreachable pattern
77 --> $DIR/consts-opaque.rs:63:9
80 | --- matches any value
82 LL | Bar => {} // should not be emitting unreachable warning
83 | ^^^ unreachable pattern
85 error: unreachable pattern
86 --> $DIR/consts-opaque.rs:65:9
89 | --- matches any value
92 | ^ unreachable pattern
94 error: to use a constant of type `Bar` in a pattern, `Bar` must be annotated with `#[derive(PartialEq, Eq)]`
95 --> $DIR/consts-opaque.rs:70:9
100 error: to use a constant of type `Bar` in a pattern, `Bar` must be annotated with `#[derive(PartialEq, Eq)]`
101 --> $DIR/consts-opaque.rs:72:9
103 LL | BAR => {} // should not be emitting unreachable warning
106 error: unreachable pattern
107 --> $DIR/consts-opaque.rs:72:9
110 | --- matches any value
112 LL | BAR => {} // should not be emitting unreachable warning
113 | ^^^ unreachable pattern
115 error: unreachable pattern
116 --> $DIR/consts-opaque.rs:75:9
119 | --- matches any value
121 LL | _ => {} // should not be emitting unreachable warning
122 | ^ unreachable pattern
124 error: to use a constant of type `Baz` in a pattern, `Baz` must be annotated with `#[derive(PartialEq, Eq)]`
125 --> $DIR/consts-opaque.rs:80:9
130 error: unreachable pattern
131 --> $DIR/consts-opaque.rs:82:9
134 | --- matches any value
136 LL | Baz::Baz1 => {} // should not be emitting unreachable warning
137 | ^^^^^^^^^ unreachable pattern
139 error: unreachable pattern
140 --> $DIR/consts-opaque.rs:84:9
143 | --- matches any value
146 | ^ unreachable pattern
148 error: to use a constant of type `Baz` in a pattern, `Baz` must be annotated with `#[derive(PartialEq, Eq)]`
149 --> $DIR/consts-opaque.rs:90:9
154 error: unreachable pattern
155 --> $DIR/consts-opaque.rs:92:9
158 | --- matches any value
161 | ^ unreachable pattern
163 error: to use a constant of type `Baz` in a pattern, `Baz` must be annotated with `#[derive(PartialEq, Eq)]`
164 --> $DIR/consts-opaque.rs:97:9
169 error: unreachable pattern
170 --> $DIR/consts-opaque.rs:99:9
173 | --- matches any value
175 LL | Baz::Baz2 => {} // should not be emitting unreachable warning
176 | ^^^^^^^^^ unreachable pattern
178 error: unreachable pattern
179 --> $DIR/consts-opaque.rs:101:9
182 | --- matches any value
184 LL | _ => {} // should not be emitting unreachable warning
185 | ^ unreachable pattern
187 error: unreachable pattern
188 --> $DIR/consts-opaque.rs:127:9
191 | ------- matches any value
192 LL | WRAPQUUX => {} // detected unreachable because we do inspect the `Wrap` layer
193 | ^^^^^^^^ unreachable pattern
195 error: unreachable pattern
196 --> $DIR/consts-opaque.rs:141:9
198 LL | WHOKNOWSQUUX => {} // detected unreachable because we do inspect the `WhoKnows` layer
201 error: aborting due to 24 previous errors; 1 warning emitted