File tree Expand file tree Collapse file tree 4 files changed +28
-6
lines changed
compiler/rustc_middle/src/middle Expand file tree Collapse file tree 4 files changed +28
-6
lines changed Original file line number Diff line number Diff line change @@ -150,7 +150,7 @@ pub fn deprecation_suggestion(
150150 span : Span ,
151151) {
152152 if let Some ( suggestion) = suggestion {
153- diag. span_suggestion (
153+ diag. span_suggestion_verbose (
154154 span,
155155 & format ! ( "replace the use of the deprecated {}" , kind) ,
156156 suggestion,
Original file line number Diff line number Diff line change @@ -2,9 +2,13 @@ warning: use of deprecated constant `std::sync::atomic::ATOMIC_ISIZE_INIT`: the
22 --> $DIR/atomic_initializers.rs:8:27
33 |
44LL | static FOO: AtomicIsize = ATOMIC_ISIZE_INIT;
5- | ^^^^^^^^^^^^^^^^^ help: replace the use of the deprecated constant: `AtomicIsize::new(0)`
5+ | ^^^^^^^^^^^^^^^^^
66 |
77 = note: `#[warn(deprecated)]` on by default
8+ help: replace the use of the deprecated constant
9+ |
10+ LL | static FOO: AtomicIsize = AtomicIsize::new(0);
11+ | ~~~~~~~~~~~~~~~~~~~
812
913warning: 1 warning emitted
1014
Original file line number Diff line number Diff line change @@ -2,19 +2,28 @@ error: use of deprecated associated function `core::str::<impl str>::trim_left`:
22 --> $DIR/issue-84637-deprecated-associated-function.rs:6:21
33 |
44LL | let _foo = str::trim_left(" aoeu");
5- | ^^^^^^^^^ help: replace the use of the deprecated associated function: `trim_start`
5+ | ^^^^^^^^^
66 |
77note: the lint level is defined here
88 --> $DIR/issue-84637-deprecated-associated-function.rs:3:9
99 |
1010LL | #![deny(deprecated)]
1111 | ^^^^^^^^^^
12+ help: replace the use of the deprecated associated function
13+ |
14+ LL | let _foo = str::trim_start(" aoeu");
15+ | ~~~~~~~~~~
1216
1317error: use of deprecated associated function `core::str::<impl str>::trim_left`: superseded by `trim_start`
1418 --> $DIR/issue-84637-deprecated-associated-function.rs:8:26
1519 |
1620LL | let _bar = " aoeu".trim_left();
17- | ^^^^^^^^^ help: replace the use of the deprecated associated function: `trim_start`
21+ | ^^^^^^^^^
22+ |
23+ help: replace the use of the deprecated associated function
24+ |
25+ LL | let _bar = " aoeu".trim_start();
26+ | ~~~~~~~~~~
1827
1928error: aborting due to 2 previous errors
2029
Original file line number Diff line number Diff line change @@ -2,19 +2,28 @@ error: use of deprecated function `bar::deprecated`: replaced by `replacement`
22 --> $DIR/suggestion.rs:42:10
33 |
44LL | bar::deprecated();
5- | ^^^^^^^^^^ help: replace the use of the deprecated function: `replacement`
5+ | ^^^^^^^^^^
66 |
77note: the lint level is defined here
88 --> $DIR/suggestion.rs:8:9
99 |
1010LL | #![deny(deprecated)]
1111 | ^^^^^^^^^^
12+ help: replace the use of the deprecated function
13+ |
14+ LL | bar::replacement();
15+ | ~~~~~~~~~~~
1216
1317error: use of deprecated associated function `Foo::deprecated`: replaced by `replacement`
1418 --> $DIR/suggestion.rs:40:9
1519 |
1620LL | foo.deprecated();
17- | ^^^^^^^^^^ help: replace the use of the deprecated associated function: `replacement`
21+ | ^^^^^^^^^^
22+ |
23+ help: replace the use of the deprecated associated function
24+ |
25+ LL | foo.replacement();
26+ | ~~~~~~~~~~~
1827
1928error: aborting due to 2 previous errors
2029
You can’t perform that action at this time.
0 commit comments