2015-04-13 23:28:18 +05:30
|
|
|
#![feature(plugin)]
|
|
|
|
|
|
|
|
#![plugin(clippy)]
|
|
|
|
#![deny(clippy)]
|
|
|
|
|
|
|
|
fn main(){
|
|
|
|
let x = Some(1u8);
|
2015-08-12 10:46:49 +02:00
|
|
|
match x { //~ ERROR you seem to be trying to use match
|
|
|
|
//~^ HELP try
|
2015-08-11 19:26:33 +02:00
|
|
|
Some(y) => {
|
|
|
|
println!("{:?}", y);
|
|
|
|
}
|
2015-04-13 23:28:18 +05:30
|
|
|
_ => ()
|
|
|
|
}
|
|
|
|
// Not linted
|
|
|
|
match x {
|
|
|
|
Some(y) => println!("{:?}", y),
|
|
|
|
None => ()
|
|
|
|
}
|
|
|
|
let z = (1u8,1u8);
|
2015-08-12 10:46:49 +02:00
|
|
|
match z { //~ ERROR you seem to be trying to use match
|
|
|
|
//~^ HELP try
|
2015-04-13 23:28:18 +05:30
|
|
|
(2...3, 7...9) => println!("{:?}", z),
|
|
|
|
_ => {}
|
|
|
|
}
|
|
|
|
}
|