Properly formatting the multipart suggestion

This commit is contained in:
stoozy 2022-09-27 11:06:51 -04:00
parent 365457bd25
commit 24c8e27a1d

View File

@ -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();