error: to use a constant of type `Foo` in a pattern, `Foo` must be annotated with `#[derive(PartialEq, Eq)]` --> $DIR/consts-opaque.rs:34:9 | LL | FOO => {} | ^^^ error: unreachable pattern --> $DIR/consts-opaque.rs:36:9 | LL | _ => {} // should not be emitting unreachable warning | ^ | note: the lint level is defined here --> $DIR/consts-opaque.rs:6:9 | LL | #![deny(unreachable_patterns)] | ^^^^^^^^^^^^^^^^^^^^ error: to use a constant of type `Foo` in a pattern, `Foo` must be annotated with `#[derive(PartialEq, Eq)]` --> $DIR/consts-opaque.rs:41:9 | LL | FOO_REF => {} | ^^^^^^^ error: unreachable pattern --> $DIR/consts-opaque.rs:43:9 | LL | Foo(_) => {} // should not be emitting unreachable warning | ^^^^^^ warning: to use a constant of type `Foo` in a pattern, `Foo` must be annotated with `#[derive(PartialEq, Eq)]` --> $DIR/consts-opaque.rs:49:9 | LL | FOO_REF_REF => {} | ^^^^^^^^^^^ | = note: `#[warn(indirect_structural_match)]` on by default = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #62411 error: to use a constant of type `Bar` in a pattern, `Bar` must be annotated with `#[derive(PartialEq, Eq)]` --> $DIR/consts-opaque.rs:57:9 | LL | BAR => {} // should not be emitting unreachable warning | ^^^ error: unreachable pattern --> $DIR/consts-opaque.rs:57:9 | LL | Bar => {} | --- matches any value LL | BAR => {} // should not be emitting unreachable warning | ^^^ unreachable pattern error: unreachable pattern --> $DIR/consts-opaque.rs:60:9 | LL | Bar => {} | --- matches any value ... LL | _ => {} | ^ unreachable pattern error: to use a constant of type `Bar` in a pattern, `Bar` must be annotated with `#[derive(PartialEq, Eq)]` --> $DIR/consts-opaque.rs:65:9 | LL | BAR => {} | ^^^ error: unreachable pattern --> $DIR/consts-opaque.rs:67:9 | LL | Bar => {} // should not be emitting unreachable warning | ^^^ error: unreachable pattern --> $DIR/consts-opaque.rs:69:9 | LL | Bar => {} // should not be emitting unreachable warning | --- matches any value LL | LL | _ => {} | ^ unreachable pattern error: to use a constant of type `Bar` in a pattern, `Bar` must be annotated with `#[derive(PartialEq, Eq)]` --> $DIR/consts-opaque.rs:74:9 | LL | BAR => {} | ^^^ error: to use a constant of type `Bar` in a pattern, `Bar` must be annotated with `#[derive(PartialEq, Eq)]` --> $DIR/consts-opaque.rs:76:9 | LL | BAR => {} // should not be emitting unreachable warning | ^^^ error: unreachable pattern --> $DIR/consts-opaque.rs:76:9 | LL | BAR => {} // should not be emitting unreachable warning | ^^^ error: unreachable pattern --> $DIR/consts-opaque.rs:79:9 | LL | _ => {} // should not be emitting unreachable warning | ^ error: to use a constant of type `Baz` in a pattern, `Baz` must be annotated with `#[derive(PartialEq, Eq)]` --> $DIR/consts-opaque.rs:84:9 | LL | BAZ => {} | ^^^ error: unreachable pattern --> $DIR/consts-opaque.rs:86:9 | LL | Baz::Baz1 => {} // should not be emitting unreachable warning | ^^^^^^^^^ error: unreachable pattern --> $DIR/consts-opaque.rs:88:9 | LL | _ => {} | ^ error: to use a constant of type `Baz` in a pattern, `Baz` must be annotated with `#[derive(PartialEq, Eq)]` --> $DIR/consts-opaque.rs:94:9 | LL | BAZ => {} | ^^^ error: unreachable pattern --> $DIR/consts-opaque.rs:96:9 | LL | _ => {} | ^ error: to use a constant of type `Baz` in a pattern, `Baz` must be annotated with `#[derive(PartialEq, Eq)]` --> $DIR/consts-opaque.rs:101:9 | LL | BAZ => {} | ^^^ error: unreachable pattern --> $DIR/consts-opaque.rs:103:9 | LL | Baz::Baz2 => {} // should not be emitting unreachable warning | ^^^^^^^^^ error: unreachable pattern --> $DIR/consts-opaque.rs:105:9 | LL | _ => {} // should not be emitting unreachable warning | ^ error: aborting due to 22 previous errors; 1 warning emitted