rust-clippy/tests/ui/patterns.rs
2017-10-03 12:07:24 +02:00

16 lines
223 B
Rust

#![allow(unused)]
#![warn(clippy)]
fn main() {
let v = Some(true);
match v {
Some(x) => (),
y @ _ => (),
}
match v {
Some(x) => (),
y @ None => (), // no error
}
}