diff options
| author | Michael Goulet <michael@errs.io> | 2025-06-24 18:59:29 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2025-06-24 18:59:42 +0000 |
| commit | 250b5d204f499c326699b0e2adf7d7757e55f16c (patch) | |
| tree | 5dae4bb56bf85510af0f57a61e904a7e8fad763f /compiler/rustc_resolve/src | |
| parent | 36b21637e93b038453924d3c66821089e71d8baa (diff) | |
| download | rust-250b5d204f499c326699b0e2adf7d7757e55f16c.tar.gz rust-250b5d204f499c326699b0e2adf7d7757e55f16c.zip | |
Make missing lifetime suggestion verbose
Diffstat (limited to 'compiler/rustc_resolve/src')
| -rw-r--r-- | compiler/rustc_resolve/src/late/diagnostics.rs | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/compiler/rustc_resolve/src/late/diagnostics.rs b/compiler/rustc_resolve/src/late/diagnostics.rs index d5dd3bdb6cd..e7b8c988cd4 100644 --- a/compiler/rustc_resolve/src/late/diagnostics.rs +++ b/compiler/rustc_resolve/src/late/diagnostics.rs @@ -3122,15 +3122,10 @@ impl<'ast, 'ra, 'tcx> LateResolutionVisitor<'_, 'ast, 'ra, 'tcx> { &mut err, Some(lifetime_ref.ident.name.as_str()), |err, _, span, message, suggestion, span_suggs| { - err.multipart_suggestion_with_style( + err.multipart_suggestion_verbose( message, std::iter::once((span, suggestion)).chain(span_suggs.clone()).collect(), Applicability::MaybeIncorrect, - if span_suggs.is_empty() { - SuggestionStyle::ShowCode - } else { - SuggestionStyle::ShowAlways - }, ); true }, |
