Rollup merge of #141781 - matthewjasper:unused-unsafe-lifetimes, r=compiler-errors

Fix spans for unsafe binders

closes rust-lang/rust#141758

r? ``@compiler-errors``
This commit is contained in:
Jubilee
2025-05-30 13:52:28 -07:00
committed by GitHub
7 changed files with 111 additions and 2 deletions

View File

@@ -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,