confirm using chain in collapsible_span_lint_calls

This commit is contained in:
kyoto7250 2022-06-20 13:17:54 +09:00
parent e933bb6bc3
commit 4a4b5cf061
3 changed files with 13 additions and 2 deletions

View file

@ -668,6 +668,7 @@ impl<'tcx> LateLintPass<'tcx> for CollapsibleCalls {
let body = cx.tcx.hir().body(*body);
let only_expr = peel_blocks_with_stmt(&body.value);
if let ExprKind::MethodCall(ps, span_call_args, _) = &only_expr.kind;
if let ExprKind::Path(..) = span_call_args[0].kind;
then {
let and_then_snippets = get_and_then_snippets(cx, and_then_args);
let mut sle = SpanlessEq::new(cx).deny_side_effects();

View file

@ -45,7 +45,12 @@ impl EarlyLintPass for Pass {
if predicate {
db.note(note_msg);
}
})
});
// Issue #8798
span_lint_and_then(cx, TEST_LINT, expr.span, lint_msg, |db| {
db.help(help_msg).help(help_msg);
});
}
}

View file

@ -55,7 +55,12 @@ impl EarlyLintPass for Pass {
if predicate {
db.note(note_msg);
}
})
});
// Issue #8798
span_lint_and_then(cx, TEST_LINT, expr.span, lint_msg, |db| {
db.help(help_msg).help(help_msg);
});
}
}