]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/const_in_pattern/issue-65466.rs
Rollup merge of #98609 - TaKO8Ki:fix-ice-for-associated-constant-generics, r=lcnr
[rust.git] / src / test / ui / consts / const_in_pattern / issue-65466.rs
1 #![deny(indirect_structural_match)]
2
3 // check-pass
4
5 #[derive(PartialEq, Eq)]
6 enum O<T> {
7     Some(*const T), // Can also use PhantomData<T>
8     None,
9 }
10
11 struct B;
12
13 const C: &[O<B>] = &[O::None];
14
15 fn main() {
16     let x = O::None;
17     match &[x][..] {
18         C => (),
19         _ => (),
20     }
21 }