Allow needless_bool in macro
This commit is contained in:
parent
94d6be4c0a
commit
3fc8dae46c
@ -71,6 +71,9 @@
|
||||
impl<'tcx> LateLintPass<'tcx> for NeedlessBool {
|
||||
fn check_expr(&mut self, cx: &LateContext<'tcx>, e: &'tcx Expr<'_>) {
|
||||
use self::Expression::{Bool, RetBool};
|
||||
if e.span.from_expansion() {
|
||||
return;
|
||||
}
|
||||
if let ExprKind::If(pred, then_block, Some(else_expr)) = e.kind {
|
||||
let reduce = |ret, not| {
|
||||
let mut applicability = Applicability::MachineApplicable;
|
||||
|
Loading…
Reference in New Issue
Block a user