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 c48d6b0 commit 05c48a3Copy full SHA for 05c48a3
compiler/rustc_lint/src/builtin.rs
@@ -1584,6 +1584,8 @@ impl EarlyLintPass for DoubleNegations {
1584
if let ExprKind::Unary(UnOp::Neg, ref inner) = expr.kind
1585
&& let ExprKind::Unary(UnOp::Neg, ref inner2) = inner.kind
1586
&& !matches!(inner2.kind, ExprKind::Unary(UnOp::Neg, _))
1587
+ // Don't lint if this jumps macro expansion boundary (Issue #143980)
1588
+ && expr.span.eq_ctxt(inner.span)
1589
{
1590
cx.emit_span_lint(
1591
DOUBLE_NEGATIONS,
0 commit comments