diff options
| author | Urgau <urgau@numericable.fr> | 2025-08-15 11:59:23 +0200 |
|---|---|---|
| committer | Urgau <urgau@numericable.fr> | 2025-08-15 11:59:23 +0200 |
| commit | ae4eeb9299b5938cca183ad7a90e70a1bb4b1174 (patch) | |
| tree | 26ccb715bcb1dc45b2105d46757957873185562b /compiler/rustc_lint/src | |
| parent | 8800ec16657b24ad8a2f443c133bf0b56ae76033 (diff) | |
| download | rust-ae4eeb9299b5938cca183ad7a90e70a1bb4b1174.tar.gz rust-ae4eeb9299b5938cca183ad7a90e70a1bb4b1174.zip | |
Fix wrong spans with external macros in the `dropping_copy_types` lint
Diffstat (limited to 'compiler/rustc_lint/src')
| -rw-r--r-- | compiler/rustc_lint/src/drop_forget_useless.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_lint/src/drop_forget_useless.rs b/compiler/rustc_lint/src/drop_forget_useless.rs index 7f098893f7d..c2d137986ce 100644 --- a/compiler/rustc_lint/src/drop_forget_useless.rs +++ b/compiler/rustc_lint/src/drop_forget_useless.rs @@ -151,7 +151,7 @@ impl<'tcx> LateLintPass<'tcx> for DropForgetUseless { && let Node::Stmt(stmt) = node && let StmtKind::Semi(e) = stmt.kind && e.hir_id == expr.hir_id - && let Some(arg_span) = arg.span.find_ancestor_inside(expr.span) + && let Some(arg_span) = arg.span.find_ancestor_inside_same_ctxt(expr.span) { UseLetUnderscoreIgnoreSuggestion::Suggestion { start_span: expr.span.shrink_to_lo().until(arg_span), |
