2015-05-02 00:35:49 +02:00
|
|
|
#![feature(plugin)]
|
|
|
|
#![plugin(clippy)]
|
|
|
|
|
|
|
|
#[deny(needless_bool)]
|
|
|
|
fn main() {
|
2015-08-11 20:22:20 +02:00
|
|
|
let x = true;
|
|
|
|
if x { true } else { true }; //~ERROR
|
|
|
|
if x { false } else { false }; //~ERROR
|
|
|
|
if x { true } else { false }; //~ERROR
|
|
|
|
if x { false } else { true }; //~ERROR
|
|
|
|
if x { x } else { false }; // would also be questionable, but we don't catch this yet
|
2015-05-02 00:35:49 +02:00
|
|
|
}
|