clippy 0.0.13

A bunch of helpful lints to avoid common pitfalls in Rust
1
2
3
4
5
6
7
8
9
10
11
12
13
#![feature(plugin)]
#![plugin(clippy)]

#![deny(let_unit_value)]

fn main() {
    let _x = println!("x");  //~ERROR this let-binding has unit value
    let _y = 1;   // this is fine
    let _z = ((), 1);  // this as well
    if true {
        let _a = ();  //~ERROR this let-binding has unit value
    }
}