#![deny(indirect_structural_match)] //@ check-pass #[derive(PartialEq, Eq)] enum O { Some(*const T), // Can also use PhantomData None, } struct B; const C: &[O] = &[O::None]; fn main() { let x = O::None; match &[x][..] { C => (), //~WARN: the type must implement `PartialEq` //~| previously accepted _ => (), } }