diff --git a/examples/match_if_let.rs b/examples/match_if_let.rs new file mode 100644 index 00000000000..bdb6cc8ecfd --- /dev/null +++ b/examples/match_if_let.rs @@ -0,0 +1,23 @@ +#![feature(phase)] + +#[phase(plugin)] +extern crate rust_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), + _ => {} + } +} \ No newline at end of file