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
7 error: unreachable pattern
8 --> $DIR/consts-opaque.rs:36:9
10 LL | _ => {} // should not be emitting unreachable warning
13 note: the lint level is defined here
14 --> $DIR/consts-opaque.rs:6:9
16 LL | #![deny(unreachable_patterns)]
17 | ^^^^^^^^^^^^^^^^^^^^
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
25 error: unreachable pattern
26 --> $DIR/consts-opaque.rs:43:9
28 LL | Foo(_) => {} // should not be emitting unreachable warning
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
34 LL | FOO_REF_REF => {}
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>
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
44 LL | BAR => {} // should not be emitting unreachable warning
47 error: unreachable pattern
48 --> $DIR/consts-opaque.rs:57:9
51 | --- matches any value
52 LL | BAR => {} // should not be emitting unreachable warning
53 | ^^^ unreachable pattern
55 error: unreachable pattern
56 --> $DIR/consts-opaque.rs:60:9
59 | --- matches any value
62 | ^ unreachable pattern
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
70 error: unreachable pattern
71 --> $DIR/consts-opaque.rs:67:9
73 LL | Bar => {} // should not be emitting unreachable warning
76 error: unreachable pattern
77 --> $DIR/consts-opaque.rs:69:9
79 LL | Bar => {} // should not be emitting unreachable warning
80 | --- matches any value
83 | ^ unreachable pattern
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
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
94 LL | BAR => {} // should not be emitting unreachable warning
97 error: unreachable pattern
98 --> $DIR/consts-opaque.rs:76:9
100 LL | BAR => {} // should not be emitting unreachable warning
103 error: unreachable pattern
104 --> $DIR/consts-opaque.rs:79:9
106 LL | _ => {} // should not be emitting unreachable warning
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
115 error: unreachable pattern
116 --> $DIR/consts-opaque.rs:86:9
118 LL | Baz::Baz1 => {} // should not be emitting unreachable warning
121 error: unreachable pattern
122 --> $DIR/consts-opaque.rs:88:9
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
133 error: unreachable pattern
134 --> $DIR/consts-opaque.rs:96:9
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
145 error: unreachable pattern
146 --> $DIR/consts-opaque.rs:103:9
148 LL | Baz::Baz2 => {} // should not be emitting unreachable warning
151 error: unreachable pattern
152 --> $DIR/consts-opaque.rs:105:9
154 LL | _ => {} // should not be emitting unreachable warning
157 error: aborting due to 22 previous errors; 1 warning emitted