From 942a08b559714576ee97bb2f4001f20547de427d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jana=20D=C3=B6nszelmann?= Date: Mon, 8 Dec 2025 10:48:42 +0100 Subject: [PATCH] Revert "early return on duplicate span lowerings" This reverts commit 0087253015d1191b97b5e312c2409e008db87ed6. --- compiler/rustc_ast_lowering/src/lib.rs | 7 ------- 1 file changed, 7 deletions(-) diff --git a/compiler/rustc_ast_lowering/src/lib.rs b/compiler/rustc_ast_lowering/src/lib.rs index ab5caff86204d..dff46ece65430 100644 --- a/compiler/rustc_ast_lowering/src/lib.rs +++ b/compiler/rustc_ast_lowering/src/lib.rs @@ -225,13 +225,6 @@ struct SpanLowerer { impl SpanLowerer { fn lower(&self, span: Span) -> Span { if self.is_incremental { - // early return: span lowering takes some time since it accesses the query dependency graph - // to make sure we rerun the right code paths when spans change. When we've already lowered a span, - // or don't have to, bail out ASAP. - if span.is_dummy() || span.parent().is_some_and(|i| i == self.def_id) { - return span; - } - span.with_parent(Some(self.def_id)) } else { // Do not make spans relative when not using incremental compilation.