about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--compiler/rustc_middle/src/middle/stability.rs2
-rw-r--r--src/test/ui/deprecation/atomic_initializers.stderr6
-rw-r--r--src/test/ui/deprecation/issue-84637-deprecated-associated-function.stderr13
-rw-r--r--src/test/ui/deprecation/suggestion.stderr13
4 files changed, 28 insertions, 6 deletions
diff --git a/compiler/rustc_middle/src/middle/stability.rs b/compiler/rustc_middle/src/middle/stability.rs
index d23707a9d31..802b7852bac 100644
--- a/compiler/rustc_middle/src/middle/stability.rs
+++ b/compiler/rustc_middle/src/middle/stability.rs
@@ -150,7 +150,7 @@ pub fn deprecation_suggestion(
     span: Span,
 ) {
     if let Some(suggestion) = suggestion {
-        diag.span_suggestion(
+        diag.span_suggestion_verbose(
             span,
             &format!("replace the use of the deprecated {}", kind),
             suggestion,
diff --git a/src/test/ui/deprecation/atomic_initializers.stderr b/src/test/ui/deprecation/atomic_initializers.stderr
index eaf5c61b440..30fcc9de618 100644
--- a/src/test/ui/deprecation/atomic_initializers.stderr
+++ b/src/test/ui/deprecation/atomic_initializers.stderr
@@ -2,9 +2,13 @@ warning: use of deprecated constant `std::sync::atomic::ATOMIC_ISIZE_INIT`: the
   --> $DIR/atomic_initializers.rs:8:27
    |
 LL | static FOO: AtomicIsize = ATOMIC_ISIZE_INIT;
-   |                           ^^^^^^^^^^^^^^^^^ help: replace the use of the deprecated constant: `AtomicIsize::new(0)`
+   |                           ^^^^^^^^^^^^^^^^^
    |
    = note: `#[warn(deprecated)]` on by default
+help: replace the use of the deprecated constant
+   |
+LL | static FOO: AtomicIsize = AtomicIsize::new(0);
+   |                           ~~~~~~~~~~~~~~~~~~~
 
 warning: 1 warning emitted
 
diff --git a/src/test/ui/deprecation/issue-84637-deprecated-associated-function.stderr b/src/test/ui/deprecation/issue-84637-deprecated-associated-function.stderr
index e65d21bb09b..8d4529526e3 100644
--- a/src/test/ui/deprecation/issue-84637-deprecated-associated-function.stderr
+++ b/src/test/ui/deprecation/issue-84637-deprecated-associated-function.stderr
@@ -2,19 +2,28 @@ error: use of deprecated associated function `core::str::<impl str>::trim_left`:
   --> $DIR/issue-84637-deprecated-associated-function.rs:6:21
    |
 LL |     let _foo = str::trim_left("   aoeu");
-   |                     ^^^^^^^^^ help: replace the use of the deprecated associated function: `trim_start`
+   |                     ^^^^^^^^^
    |
 note: the lint level is defined here
   --> $DIR/issue-84637-deprecated-associated-function.rs:3:9
    |
 LL | #![deny(deprecated)]
    |         ^^^^^^^^^^
+help: replace the use of the deprecated associated function
+   |
+LL |     let _foo = str::trim_start("   aoeu");
+   |                     ~~~~~~~~~~
 
 error: use of deprecated associated function `core::str::<impl str>::trim_left`: superseded by `trim_start`
   --> $DIR/issue-84637-deprecated-associated-function.rs:8:26
    |
 LL |     let _bar = "   aoeu".trim_left();
-   |                          ^^^^^^^^^ help: replace the use of the deprecated associated function: `trim_start`
+   |                          ^^^^^^^^^
+   |
+help: replace the use of the deprecated associated function
+   |
+LL |     let _bar = "   aoeu".trim_start();
+   |                          ~~~~~~~~~~
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/deprecation/suggestion.stderr b/src/test/ui/deprecation/suggestion.stderr
index 8d1e108345f..c5f2fc09125 100644
--- a/src/test/ui/deprecation/suggestion.stderr
+++ b/src/test/ui/deprecation/suggestion.stderr
@@ -2,19 +2,28 @@ error: use of deprecated function `bar::deprecated`: replaced by `replacement`
   --> $DIR/suggestion.rs:42:10
    |
 LL |     bar::deprecated();
-   |          ^^^^^^^^^^ help: replace the use of the deprecated function: `replacement`
+   |          ^^^^^^^^^^
    |
 note: the lint level is defined here
   --> $DIR/suggestion.rs:8:9
    |
 LL | #![deny(deprecated)]
    |         ^^^^^^^^^^
+help: replace the use of the deprecated function
+   |
+LL |     bar::replacement();
+   |          ~~~~~~~~~~~
 
 error: use of deprecated associated function `Foo::deprecated`: replaced by `replacement`
   --> $DIR/suggestion.rs:40:9
    |
 LL |     foo.deprecated();
-   |         ^^^^^^^^^^ help: replace the use of the deprecated associated function: `replacement`
+   |         ^^^^^^^^^^
+   |
+help: replace the use of the deprecated associated function
+   |
+LL |     foo.replacement();
+   |         ~~~~~~~~~~~
 
 error: aborting due to 2 previous errors