summary refs log tree commit diff
path: root/compiler/rustc_resolve/src
diff options
context:
space:
mode:
authorMatthew Jasper <mjjasper1@gmail.com>2025-05-30 16:46:16 +0000
committerMatthew Jasper <mjjasper1@gmail.com>2025-05-30 16:58:48 +0000
commit4a1843924e80815b159963693d4a5d3362cb74d8 (patch)
treeabecab1d0d55750543c9f6ec3c71531a85a28f6f /compiler/rustc_resolve/src
parente6152cdf5b31bd844a4cc1049433859d54863602 (diff)
downloadrust-4a1843924e80815b159963693d4a5d3362cb74d8.tar.gz
rust-4a1843924e80815b159963693d4a5d3362cb74d8.zip
Fix spans for unsafe binders
Diffstat (limited to 'compiler/rustc_resolve/src')
-rw-r--r--compiler/rustc_resolve/src/late.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/rustc_resolve/src/late.rs b/compiler/rustc_resolve/src/late.rs
index 4cfa079e49b..fb1534d0b27 100644
--- a/compiler/rustc_resolve/src/late.rs
+++ b/compiler/rustc_resolve/src/late.rs
@@ -934,8 +934,7 @@ impl<'ra: 'ast, 'ast, 'tcx> Visitor<'ast> for LateResolutionVisitor<'_, 'ast, 'r
                 )
             }
             TyKind::UnsafeBinder(unsafe_binder) => {
-                // FIXME(unsafe_binder): Better span
-                let span = ty.span;
+                let span = ty.span.shrink_to_lo().to(unsafe_binder.inner_ty.span.shrink_to_lo());
                 self.with_generic_param_rib(
                     &unsafe_binder.generic_params,
                     RibKind::Normal,