#[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 => (), //~ERROR: the type must implement `PartialEq` _ => (), } }