Fix invalid condition in nonminimal_bool
lint
This commit is contained in:
parent
4c1d05cfa1
commit
ebf20954ee
@ -148,8 +148,8 @@ fn check_inverted_bool_in_condition(
|
|||||||
right: &Expr<'_>,
|
right: &Expr<'_>,
|
||||||
) {
|
) {
|
||||||
if expr_span.from_expansion()
|
if expr_span.from_expansion()
|
||||||
&& (!cx.typeck_results().node_types()[left.hir_id].is_bool()
|
|| !cx.typeck_results().node_types()[left.hir_id].is_bool()
|
||||||
|| !cx.typeck_results().node_types()[right.hir_id].is_bool())
|
|| !cx.typeck_results().node_types()[right.hir_id].is_bool()
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user