error: constant of non-structural type `Foo` in a pattern --> $DIR/no-eq-branch-fail.rs:19:9 | LL | enum Foo { | -------- `Foo` must be annotated with `#[derive(PartialEq)]` to be usable in patterns ... LL | const BAR_BAZ: Foo = if 42 == 42 { | ------------------ constant defined here ... LL | BAR_BAZ => panic!(), | ^^^^^^^ constant of non-structural type | = note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralPartialEq.html for details error: aborting due to 1 previous error