From 24c8e27a1d1693786a5ec0ddffedefeb01ff4fb4 Mon Sep 17 00:00:00 2001 From: stoozy Date: Tue, 27 Sep 2022 11:06:51 -0400 Subject: [PATCH] Properly formatting the multipart suggestion --- compiler/rustc_resolve/src/late/lifetimes.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/rustc_resolve/src/late/lifetimes.rs b/compiler/rustc_resolve/src/late/lifetimes.rs index 991d8f88307..9b66c42651d 100644 --- a/compiler/rustc_resolve/src/late/lifetimes.rs +++ b/compiler/rustc_resolve/src/late/lifetimes.rs @@ -1336,7 +1336,7 @@ fn resolve_lifetime_ref( diag.multipart_suggestion("consider introducing a named lifetime parameter", vec![ - (lifetime_ref.span, "&'a ".to_owned()), + (lifetime_ref.span.shrink_to_hi(), "'a ".to_owned()), (generics.span, "<'a>".to_owned()) ], rustc_errors::Applicability::MaybeIncorrect); diag.emit();