Skip to content

Commit

Permalink
add test for rust-lang#117626
Browse files Browse the repository at this point in the history
  • Loading branch information
bvanjoi committed Dec 28, 2023
1 parent f4d794e commit 437f07b
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions tests/ui/pattern/issue-117626.rs
Original file line number Diff line number Diff line change
@@ -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,
};
}

0 comments on commit 437f07b

Please sign in to comment.