rust/tests/ui/pattern/usefulness/issue-30240-b.rs

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

16 lines
259 B
Rust
Raw Normal View History

#![deny(unreachable_patterns)]
fn main() {
match "world" {
"hello" => {}
_ => {},
}
match "world" {
ref _x if false => {}
"hello" => {}
"hello" => {} //~ ERROR unreachable pattern
_ => {},
}
}