We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 94d6be4 commit 3fc8daeCopy full SHA for 3fc8dae
clippy_lints/src/needless_bool.rs
@@ -71,6 +71,9 @@ declare_lint_pass!(NeedlessBool => [NEEDLESS_BOOL]);
71
impl<'tcx> LateLintPass<'tcx> for NeedlessBool {
72
fn check_expr(&mut self, cx: &LateContext<'tcx>, e: &'tcx Expr<'_>) {
73
use self::Expression::{Bool, RetBool};
74
+ if e.span.from_expansion() {
75
+ return;
76
+ }
77
if let ExprKind::If(pred, then_block, Some(else_expr)) = e.kind {
78
let reduce = |ret, not| {
79
let mut applicability = Applicability::MachineApplicable;
0 commit comments