Skip to content

Commit

Permalink
Properly formatting the multipart suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
Stoozy committed Sep 27, 2022
1 parent 365457b commit 24c8e27
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/rustc_resolve/src/late/lifetimes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1336,7 +1336,7 @@ impl<'a, 'tcx> LifetimeContext<'a, 'tcx> {

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();
Expand Down

0 comments on commit 24c8e27

Please sign in to comment.