Skip to content

Commit

Permalink
Rollup merge of rust-lang#117636 - bvanjoi:fix-117626, r=TaKO8Ki
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiaskrgr authored Jan 4, 2024
2 parents 139fb22 + 437f07b commit b05273b
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 b05273b

Please # to comment.