blob: 62efce648761af8cc57fc1799c5cd1fb372bb6ec (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#[derive(PartialEq, Eq)]
enum O<T> {
Some(*const T), // Can also use PhantomData<T>
None,
}
struct B;
const C: &[O<B>] = &[O::None];
fn main() {
let x = O::None;
match &[x][..] {
C => (), //~ERROR: the type must implement `PartialEq`
_ => (),
}
}
|