rust/tests/ui/pattern/usefulness/issue-66501.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

13 lines
209 B
Rust
Raw Normal View History

2020-10-01 00:09:57 -05:00
// check-pass
#![allow(unreachable_patterns)]
fn main() {
const CONST: &[Option<()>; 1] = &[Some(())];
match &[Some(())] {
&[None] => {}
CONST => {}
&[Some(())] => {}
}
}