error: constant of non-structural type `&[O]` in a pattern --> $DIR/issue-65466.rs:14:9 | LL | struct B; | -------- must be annotated with `#[derive(PartialEq)]` to be usable in patterns LL | LL | const C: &[O] = &[O::None]; | ---------------- constant defined here ... LL | C => (), | ^ 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