]> git.lizzy.rs Git - rust.git/blob - src/test/ui/pattern/usefulness/issue-30240-b.rs
Rollup merge of #80298 - PankajChaudhary5:PankajChaudhary, r=GuillaumeGomez
[rust.git] / src / test / ui / pattern / usefulness / issue-30240-b.rs
1 #![deny(unreachable_patterns)]
2
3 fn main() {
4     match "world" {
5         "hello" => {}
6         _ => {},
7     }
8
9     match "world" {
10         ref _x if false => {}
11         "hello" => {}
12         "hello" => {} //~ ERROR unreachable pattern
13         _ => {},
14     }
15 }