mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 17:24:06 +00:00
16 lines
259 B
Rust
16 lines
259 B
Rust
#![deny(unreachable_patterns)]
|
|
|
|
fn main() {
|
|
match "world" {
|
|
"hello" => {}
|
|
_ => {},
|
|
}
|
|
|
|
match "world" {
|
|
ref _x if false => {}
|
|
"hello" => {}
|
|
"hello" => {} //~ ERROR unreachable pattern
|
|
_ => {},
|
|
}
|
|
}
|