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 | ^^^^^^ error: to use a constant of type `Bar` in a pattern, `Bar` must be annotated with `#[derive(PartialEq, Eq)]` --> $DIR/consts-opaque.rs:55:9 | LL | BAR => {} // should not be emitting unreachable warning | ^^^ error: unreachable pattern --> $DIR/consts-opaque.rs:55:9 | LL | Bar => {} | --- matches any value LL | BAR => {} // should not be emitting unreachable warning | ^^^ unreachable pattern error: unreachable pattern --> $DIR/consts-opaque.rs:58: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:63:9 | LL | BAR => {} | ^^^ error: unreachable pattern --> $DIR/consts-opaque.rs:65:9 | LL | Bar => {} // should not be emitting unreachable warning | ^^^ error: unreachable pattern --> $DIR/consts-opaque.rs:67: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:72: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:74:9 | LL | BAR => {} // should not be emitting unreachable warning | ^^^ error: unreachable pattern --> $DIR/consts-opaque.rs:74:9 | LL | BAR => {} // should not be emitting unreachable warning | ^^^ error: unreachable pattern --> $DIR/consts-opaque.rs:77: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:82:9 | LL | BAZ => {} | ^^^ error: unreachable pattern --> $DIR/consts-opaque.rs:84:9 | LL | Baz::Baz1 => {} // should not be emitting unreachable warning | ^^^^^^^^^ error: unreachable pattern --> $DIR/consts-opaque.rs:86: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:92:9 | LL | BAZ => {} | ^^^ error: unreachable pattern --> $DIR/consts-opaque.rs:94: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:99:9 | LL | BAZ => {} | ^^^ error: unreachable pattern --> $DIR/consts-opaque.rs:101:9 | LL | Baz::Baz2 => {} // should not be emitting unreachable warning | ^^^^^^^^^ error: unreachable pattern --> $DIR/consts-opaque.rs:103:9 | LL | _ => {} // should not be emitting unreachable warning | ^ error: aborting due to 22 previous errors