rust/tests/ui/pattern/issue-117626.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

22 lines
287 B
Rust
Raw Normal View History

2023-12-28 17:13:54 +00:00
//@ 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,
};
}