Skip to content

Commit c1e17f5

Browse files
committed
Add a regression test for issue-66501
1 parent b218b95 commit c1e17f5

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/test/ui/pattern/issue-66501.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// check-pass
2+
3+
#![allow(unreachable_patterns)]
4+
5+
fn main() {
6+
const CONST: &[Option<()>; 1] = &[Some(())];
7+
match &[Some(())] {
8+
&[None] => {}
9+
CONST => {}
10+
&[Some(())] => {}
11+
}
12+
}

0 commit comments

Comments
 (0)