This repository was archived by the owner on May 28, 2025. It is now read-only.
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(
150
150
span : Span ,
151
151
) {
152
152
if let Some ( suggestion) = suggestion {
153
- diag. span_suggestion (
153
+ diag. span_suggestion_verbose (
154
154
span,
155
155
& format ! ( "replace the use of the deprecated {}" , kind) ,
156
156
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
2
2
--> $DIR/atomic_initializers.rs:8:27
3
3
|
4
4
LL | static FOO: AtomicIsize = ATOMIC_ISIZE_INIT;
5
- | ^^^^^^^^^^^^^^^^^ help: replace the use of the deprecated constant: `AtomicIsize::new(0)`
5
+ | ^^^^^^^^^^^^^^^^^
6
6
|
7
7
= 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
+ | ~~~~~~~~~~~~~~~~~~~
8
12
9
13
warning: 1 warning emitted
10
14
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`:
2
2
--> $DIR/issue-84637-deprecated-associated-function.rs:6:21
3
3
|
4
4
LL | let _foo = str::trim_left(" aoeu");
5
- | ^^^^^^^^^ help: replace the use of the deprecated associated function: `trim_start`
5
+ | ^^^^^^^^^
6
6
|
7
7
note: the lint level is defined here
8
8
--> $DIR/issue-84637-deprecated-associated-function.rs:3:9
9
9
|
10
10
LL | #![deny(deprecated)]
11
11
| ^^^^^^^^^^
12
+ help: replace the use of the deprecated associated function
13
+ |
14
+ LL | let _foo = str::trim_start(" aoeu");
15
+ | ~~~~~~~~~~
12
16
13
17
error: use of deprecated associated function `core::str::<impl str>::trim_left`: superseded by `trim_start`
14
18
--> $DIR/issue-84637-deprecated-associated-function.rs:8:26
15
19
|
16
20
LL | 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
+ | ~~~~~~~~~~
18
27
19
28
error: aborting due to 2 previous errors
20
29
Original file line number Diff line number Diff line change @@ -2,19 +2,28 @@ error: use of deprecated function `bar::deprecated`: replaced by `replacement`
2
2
--> $DIR/suggestion.rs:42:10
3
3
|
4
4
LL | bar::deprecated();
5
- | ^^^^^^^^^^ help: replace the use of the deprecated function: `replacement`
5
+ | ^^^^^^^^^^
6
6
|
7
7
note: the lint level is defined here
8
8
--> $DIR/suggestion.rs:8:9
9
9
|
10
10
LL | #![deny(deprecated)]
11
11
| ^^^^^^^^^^
12
+ help: replace the use of the deprecated function
13
+ |
14
+ LL | bar::replacement();
15
+ | ~~~~~~~~~~~
12
16
13
17
error: use of deprecated associated function `Foo::deprecated`: replaced by `replacement`
14
18
--> $DIR/suggestion.rs:40:9
15
19
|
16
20
LL | 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
+ | ~~~~~~~~~~~
18
27
19
28
error: aborting due to 2 previous errors
20
29
You can’t perform that action at this time.
0 commit comments