about summary refs log tree commit diff
path: root/compiler/rustc_resolve/src
diff options
context:
space:
mode:
authorMatthias Krüger <476013+matthiaskrgr@users.noreply.github.com>2025-06-26 15:47:22 +0200
committerGitHub <noreply@github.com>2025-06-26 15:47:22 +0200
commit2f8b715f102a40f733e1008f389db7be76d82006 (patch)
treeb0e65e5cb27e5bcc61a9166156d4e2d85f94a732 /compiler/rustc_resolve/src
parent2fc94f119af84d883d02cc78a99d7d81f420712c (diff)
parent250b5d204f499c326699b0e2adf7d7757e55f16c (diff)
downloadrust-2f8b715f102a40f733e1008f389db7be76d82006.tar.gz
rust-2f8b715f102a40f733e1008f389db7be76d82006.zip
Rollup merge of #142981 - compiler-errors:verbose-missing-suggestion, r=estebank
Make missing lifetime suggestion verbose

I keep seeing this suggestion when working on rustc, and it's annoying that it's inline. Part of https://github.com/rust-lang/rust/issues/141973. Feel free to close this if there's another PR already doing this.

r? ``@estebank``
Diffstat (limited to 'compiler/rustc_resolve/src')
-rw-r--r--compiler/rustc_resolve/src/late/diagnostics.rs7
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
                 },