mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-15 01:17:16 +00:00
e318328d63
* 4-space indentation * no trailing whitespace * no tabs
12 lines
357 B
Rust
Executable file
12 lines
357 B
Rust
Executable file
#![feature(plugin)]
|
|
#![plugin(clippy)]
|
|
|
|
#[deny(needless_bool)]
|
|
fn main() {
|
|
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
|
|
}
|