diff --git a/compiler/rustc_resolve/src/late/diagnostics.rs b/compiler/rustc_resolve/src/late/diagnostics.rs
index d5dd3bdb6cd8e..e7b8c988cd4af 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
},
diff --git a/tests/ui/associated-inherent-types/issue-109299.stderr b/tests/ui/associated-inherent-types/issue-109299.stderr
index 1e11c0e8c2af1..f29d3cc7834e7 100644
--- a/tests/ui/associated-inherent-types/issue-109299.stderr
+++ b/tests/ui/associated-inherent-types/issue-109299.stderr
@@ -2,9 +2,12 @@ error[E0261]: use of undeclared lifetime name `'d`
--> $DIR/issue-109299.rs:6:12
|
LL | impl Lexer<'d> {
- | - ^^ undeclared lifetime
- | |
- | help: consider introducing lifetime `'d` here: `<'d>`
+ | ^^ undeclared lifetime
+ |
+help: consider introducing lifetime `'d` here
+ |
+LL | impl<'d> Lexer<'d> {
+ | ++++
error: aborting due to 1 previous error
diff --git a/tests/ui/borrowck/generic_const_early_param.stderr b/tests/ui/borrowck/generic_const_early_param.stderr
index 3f56d6a332515..6447f92aba853 100644
--- a/tests/ui/borrowck/generic_const_early_param.stderr
+++ b/tests/ui/borrowck/generic_const_early_param.stderr
@@ -7,19 +7,24 @@ LL | struct DataWrapper<'static> {
error[E0261]: use of undeclared lifetime name `'a`
--> $DIR/generic_const_early_param.rs:6:12
|
-LL | struct DataWrapper<'static> {
- | - help: consider introducing lifetime `'a` here: `'a,`
-LL |
LL | data: &'a [u8; Self::SIZE],
| ^^ undeclared lifetime
+ |
+help: consider introducing lifetime `'a` here
+ |
+LL | struct DataWrapper<'a, 'static> {
+ | +++
error[E0261]: use of undeclared lifetime name `'a`
--> $DIR/generic_const_early_param.rs:10:18
|
LL | impl DataWrapper<'a> {
- | - ^^ undeclared lifetime
- | |
- | help: consider introducing lifetime `'a` here: `<'a>`
+ | ^^ undeclared lifetime
+ |
+help: consider introducing lifetime `'a` here
+ |
+LL | impl<'a> DataWrapper<'a> {
+ | ++++
warning: the feature `generic_const_exprs` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/generic_const_early_param.rs:1:12
diff --git a/tests/ui/cast/ice-cast-type-with-error-124848.stderr b/tests/ui/cast/ice-cast-type-with-error-124848.stderr
index 0b2ab1dfc4c17..316a484d97154 100644
--- a/tests/ui/cast/ice-cast-type-with-error-124848.stderr
+++ b/tests/ui/cast/ice-cast-type-with-error-124848.stderr
@@ -2,27 +2,34 @@ error[E0261]: use of undeclared lifetime name `'unpinned`
--> $DIR/ice-cast-type-with-error-124848.rs:7:32
|
LL | struct MyType<'a>(Cell