rust/tests/ui/pattern/usefulness/issue-105479-str-non-exhaustiveness.rs

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

13 lines
393 B
Rust
Raw Normal View History

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") => {}
}
}