diff --git a/ices/65466.rs b/ices/65466.rs new file mode 100644 index 00000000..a22ab399 --- /dev/null +++ b/ices/65466.rs @@ -0,0 +1,21 @@ +#![deny(indirect_structural_match)] + +#[derive(PartialEq, Eq)] +enum O { + Some(*const T), // Can also use PhantomData + None, +} + +struct B; + +const C: &[O] = &[O::None]; + +pub fn foo() { + let x = O::None; + match &[x][..] { + C => (), + _ => (), + } +} + +fn main() {}