Skip to content

Commit

Permalink
Unrolled build for rust-lang#117636
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#117636 - bvanjoi:fix-117626, r=TaKO8Ki

add test for rust-lang#117626

Close rust-lang#117626
  • Loading branch information
rust-timer committed Jan 4, 2024
2 parents 090d5ea + 437f07b commit 06a0ff7
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 06a0ff7

Please sign in to comment.