3 #![warn(clippy::bool_comparison)]
83 impl PartialEq<bool> for Foo {
84 fn eq(&self, _: &bool) -> bool {
88 impl PartialEq<Foo> for bool {
89 fn eq(&self, _: &Foo) -> bool {
93 impl PartialOrd<bool> for Foo {
94 fn partial_cmp(&self, _: &bool) -> Option<std::cmp::Ordering> {
98 impl PartialOrd<Foo> for bool {
99 fn partial_cmp(&self, _: &Foo) -> Option<std::cmp::Ordering> {
144 // ok, don't lint on `cfg` invocation
145 if false == cfg!(feature = "debugging") {}
146 if cfg!(feature = "debugging") == false {}
147 if true == cfg!(feature = "debugging") {}
148 if cfg!(feature = "debugging") == true {}
150 // lint, could be simplified
156 // no lint with a variable
157 let is_debug = false;
158 if is_debug == cfg!(feature = "debugging") {}
159 if cfg!(feature = "debugging") == is_debug {}
160 if is_debug == m!(func) {}
161 if m!(func) == is_debug {}
163 if is_debug == cfg!(feature = "debugging") {}
164 if cfg!(feature = "debugging") == is_debug {}
165 if is_debug == m!(func) {}
166 if m!(func) == is_debug {}