summaryrefslogtreecommitdiffstats
path: root/tests/ui/pattern/usefulness/issue-30240-b.rs
blob: 01a6e7d8cb9a8f39d7f8ae65d527c98f6a2970a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#![deny(unreachable_patterns)]

fn main() {
    match "world" {
        "hello" => {}
        _ => {},
    }

    match "world" {
        ref _x if false => {}
        "hello" => {}
        "hello" => {} //~ ERROR unreachable pattern
        _ => {},
    }
}