rust-clippy/tests/ui/patterns.rs
2019-01-08 21:46:39 +01:00

14 lines
222 B
Rust

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