mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-10 23:24:24 +00:00
23 lines
No EOL
365 B
Rust
23 lines
No EOL
365 B
Rust
#![feature(phase)]
|
|
|
|
#[phase(plugin)]
|
|
extern crate clippy;
|
|
|
|
|
|
fn main(){
|
|
let x = Some(1u);
|
|
match x {
|
|
Some(y) => println!("{}", y),
|
|
_ => ()
|
|
}
|
|
// Not linted
|
|
match x {
|
|
Some(y) => println!("{}", y),
|
|
None => ()
|
|
}
|
|
let z = (1u,1u);
|
|
match z {
|
|
(2...3, 7...9) => println!("{}", z),
|
|
_ => {}
|
|
}
|
|
} |