]> git.lizzy.rs Git - rust.git/blob - tests/ui/bool_comparison.rs
Adapt the *.stderr files of the ui-tests to the tool_lints
[rust.git] / tests / ui / bool_comparison.rs
1 #![feature(tool_lints)]
2
3
4 #[warn(clippy::bool_comparison)]
5 fn main() {
6     let x = true;
7     if x == true { "yes" } else { "no" };
8     if x == false { "yes" } else { "no" };
9     if true == x { "yes" } else { "no" };
10     if false == x { "yes" } else { "no" };
11 }