summaryrefslogtreecommitdiffstats
path: root/tests/ui/pattern/usefulness/issue-105479-str-non-exhaustiveness.rs
blob: 0ee7856c6803ad7cd0a4715abf5f138c75dc45fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
fn main() {
    let a = "";
    let b = "";
    match (a, b) {
        //~^ ERROR non-exhaustive patterns: `(&_, _)` not covered [E0004]
        //~| NOTE pattern `(&_, _)` not covered
        //~| NOTE the matched value is of type `(&str, &str)`
        //~| NOTE `&str` cannot be matched exhaustively, so a wildcard `_` is necessary
        ("a", "b") => {}
        ("c", "d") => {}
    }
}