about summary refs log tree commit diff
path: root/tests/ui/pattern/issue-117626.rs
blob: f76f6b6222259456ec6c70a94cc81037b20dff2f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
//@ check-pass

#[derive(PartialEq)]
struct NonMatchable;

impl Eq for NonMatchable {}

#[derive(PartialEq, Eq)]
enum Foo {
    A(NonMatchable),
    B(*const u8),
}

const CONST: Foo = Foo::B(std::ptr::null());

fn main() {
    match CONST {
        CONST => 0,
        _ => 1,
    };
}