From 63c07bdb5352b561b1a362d01c328982c6a03712 Mon Sep 17 00:00:00 2001 From: Abhinav Srivastav Date: Sun, 4 Oct 2026 17:24:48 +0530 Subject: [PATCH] lower spans of error const args and test binder bounds --- compiler/rustc_ast_lowering/src/item.rs | 2 +- compiler/rustc_ast_lowering/src/lib.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/rustc_ast_lowering/src/item.rs b/compiler/rustc_ast_lowering/src/item.rs index 6ec5903c5fb3b..5583287a832f5 100644 --- a/compiler/rustc_ast_lowering/src/item.rs +++ b/compiler/rustc_ast_lowering/src/item.rs @@ -2098,7 +2098,7 @@ impl<'hir> LoweringContext<'_, 'hir> { ); hir::TestBinderBoundTypeConstraint { - span: *span, + span: self.lower_span(*span), hir_id: self.lower_node_id(*node_id), params: generics.params, lhs, diff --git a/compiler/rustc_ast_lowering/src/lib.rs b/compiler/rustc_ast_lowering/src/lib.rs index 4b6e897da4c87..d331c8d732115 100644 --- a/compiler/rustc_ast_lowering/src/lib.rs +++ b/compiler/rustc_ast_lowering/src/lib.rs @@ -3363,7 +3363,7 @@ impl UnrepresentableConstArgError { ConstArg { hir_id: lowering_context.next_id(), kind: hir::ConstArgKind::Error(e), - span: self.span, + span: lowering_context.lower_span(self.span), } } }