rustc/tests/ui/pattern/usefulness/issue-30240-b.rs
2023-08-02 10:33:26 +02:00

16 lines
259 B
Rust

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