diff options
| author | Tshepang Mbambo <hopsi@tuta.io> | 2025-07-21 11:16:20 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-21 11:16:20 +0200 |
| commit | 62e3a05291ef782cf212675d9e13c0b937c788c8 (patch) | |
| tree | 57ddd8cbcb5f32bd2773165cc53b9c69d65ed720 /compiler/rustc_lint/src/builtin.rs | |
| parent | 4a45ab5ad4d6955285f79f331e677ecb5cdb60f1 (diff) | |
| parent | ad20b064c30bbe9626e8c99f2b455cc6fd836d18 (diff) | |
| download | rust-62e3a05291ef782cf212675d9e13c0b937c788c8.tar.gz rust-62e3a05291ef782cf212675d9e13c0b937c788c8.zip | |
Merge pull request #2512 from rust-lang/rustc-pull
Rustc pull update
Diffstat (limited to 'compiler/rustc_lint/src/builtin.rs')
| -rw-r--r-- | compiler/rustc_lint/src/builtin.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/rustc_lint/src/builtin.rs b/compiler/rustc_lint/src/builtin.rs index 255ff56f62b..73e68834232 100644 --- a/compiler/rustc_lint/src/builtin.rs +++ b/compiler/rustc_lint/src/builtin.rs @@ -1519,8 +1519,9 @@ impl<'tcx> LateLintPass<'tcx> for TrivialConstraints { ClauseKind::TypeOutlives(..) | ClauseKind::RegionOutlives(..) => "lifetime", + ClauseKind::UnstableFeature(_) // `ConstArgHasType` is never global as `ct` is always a param - ClauseKind::ConstArgHasType(..) + | ClauseKind::ConstArgHasType(..) // Ignore projections, as they can only be global // if the trait bound is global | ClauseKind::Projection(..) @@ -1584,6 +1585,8 @@ impl EarlyLintPass for DoubleNegations { if let ExprKind::Unary(UnOp::Neg, ref inner) = expr.kind && let ExprKind::Unary(UnOp::Neg, ref inner2) = inner.kind && !matches!(inner2.kind, ExprKind::Unary(UnOp::Neg, _)) + // Don't lint if this jumps macro expansion boundary (Issue #143980) + && expr.span.eq_ctxt(inner.span) { cx.emit_span_lint( DOUBLE_NEGATIONS, |
