add test for #117626
This commit is contained in:
parent
f4d794ea0b
commit
437f07b3cf
21
tests/ui/pattern/issue-117626.rs
Normal file
21
tests/ui/pattern/issue-117626.rs
Normal file
@ -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…
x
Reference in New Issue
Block a user