Skip to content

Commit 5c47d77

Browse files
authored
Rollup merge of #117636 - bvanjoi:fix-117626, r=TaKO8Ki
add test for #117626 Close #117626
2 parents 090d5ea + 437f07b commit 5c47d77

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

tests/ui/pattern/issue-117626.rs

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// check-pass
2+
3+
#[derive(PartialEq)]
4+
struct NonMatchable;
5+
6+
impl Eq for NonMatchable {}
7+
8+
#[derive(PartialEq, Eq)]
9+
enum Foo {
10+
A(NonMatchable),
11+
B(*const u8),
12+
}
13+
14+
const CONST: Foo = Foo::B(std::ptr::null());
15+
16+
fn main() {
17+
match CONST {
18+
CONST => 0,
19+
_ => 1,
20+
};
21+
}

0 commit comments

Comments
 (0)