mirror of https://github.com/rust-lang/rust.git
add test for #117626
This commit is contained in:
parent
f4d794ea0b
commit
437f07b3cf
|
@ -0,0 +1,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,
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue