-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split must_use_unit test into an unfixable part
With the attribute refactor in rustc, making this case machine applicable is not easily possible anymore. This splits up the tests properly.
- Loading branch information
Showing
5 changed files
with
11 additions
and
43 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
8 changes: 4 additions & 4 deletions
8
tests/ui/must_use_unit_12320.rs → tests/ui/must_use_unit_unfixable.rs
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 |
---|---|---|
@@ -1,11 +1,11 @@ | ||
//@aux-build:proc_macros.rs | ||
//@no-rustfix | ||
|
||
#![warn(clippy::must_use_unit)] | ||
#![allow(clippy::unused_unit)] | ||
|
||
#[cfg_attr(all(), must_use, deprecated)] | ||
fn issue_12320() {} | ||
//~^ must_use_unit | ||
|
||
#[cfg_attr(all(), deprecated, doc = "foo", must_use)] | ||
fn issue_12320_2() {} | ||
//~^ must_use_unit | ||
|
||
fn main() {} |
12 changes: 6 additions & 6 deletions
12
tests/ui/must_use_unit_12320.stderr → tests/ui/must_use_unit_unfixable.stderr
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