-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #58002 - oli-obk:deprecated_sugg, r=zackmdavis
Add suggestions to deprecation lints Clippy used to do this suggestion, but the clippy lints happen after the deprecation lints so we ended up never seeing the structured suggestions.
- Loading branch information
Showing
8 changed files
with
111 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// run-rustfix | ||
// compile-pass | ||
|
||
#[allow(deprecated, unused_imports)] | ||
use std::sync::atomic::{AtomicIsize, ATOMIC_ISIZE_INIT}; | ||
|
||
#[allow(dead_code)] | ||
static FOO: AtomicIsize = AtomicIsize::new(0); | ||
//~^ WARN use of deprecated item | ||
|
||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// run-rustfix | ||
// compile-pass | ||
|
||
#[allow(deprecated, unused_imports)] | ||
use std::sync::atomic::{AtomicIsize, ATOMIC_ISIZE_INIT}; | ||
|
||
#[allow(dead_code)] | ||
static FOO: AtomicIsize = ATOMIC_ISIZE_INIT; | ||
//~^ WARN use of deprecated item | ||
|
||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
warning: use of deprecated item 'std::sync::atomic::ATOMIC_ISIZE_INIT': the `new` function is now preferred | ||
--> $DIR/atomic_initializers.rs:8:27 | ||
| | ||
LL | static FOO: AtomicIsize = ATOMIC_ISIZE_INIT; | ||
| ^^^^^^^^^^^^^^^^^ | ||
| | ||
= note: #[warn(deprecated)] on by default | ||
help: use of deprecated item 'std::sync::atomic::ATOMIC_ISIZE_INIT': the `new` function is now preferred | ||
| | ||
LL | static FOO: AtomicIsize = AtomicIsize::new(0); | ||
| ^^^^^^^^^^^^^^^^^^^ | ||
|