-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add check for empty cfg
all
condition
- Loading branch information
1 parent
5328852
commit 94db4b0
Showing
4 changed files
with
31 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,34 @@ | ||
error: unneeded sub `cfg` when there is only one condition | ||
--> $DIR/non_minimal_cfg.rs:5:7 | ||
--> $DIR/non_minimal_cfg.rs:3:7 | ||
| | ||
LL | #[cfg(all(windows))] | ||
| ^^^^^^^^^^^^ help: try: `windows` | ||
| | ||
= note: `-D clippy::non-minimal-cfg` implied by `-D warnings` | ||
|
||
error: unneeded sub `cfg` when there is only one condition | ||
--> $DIR/non_minimal_cfg.rs:8:7 | ||
--> $DIR/non_minimal_cfg.rs:6:7 | ||
| | ||
LL | #[cfg(any(windows))] | ||
| ^^^^^^^^^^^^ help: try: `windows` | ||
|
||
error: unneeded sub `cfg` when there is only one condition | ||
--> $DIR/non_minimal_cfg.rs:11:11 | ||
--> $DIR/non_minimal_cfg.rs:9:11 | ||
| | ||
LL | #[cfg(all(any(unix), all(not(windows))))] | ||
| ^^^^^^^^^ help: try: `unix` | ||
|
||
error: unneeded sub `cfg` when there is only one condition | ||
--> $DIR/non_minimal_cfg.rs:11:22 | ||
--> $DIR/non_minimal_cfg.rs:9:22 | ||
| | ||
LL | #[cfg(all(any(unix), all(not(windows))))] | ||
| ^^^^^^^^^^^^^^^^^ help: try: `not(windows)` | ||
|
||
error: aborting due to 4 previous errors | ||
error: unneeded sub `cfg` when there is no condition | ||
--> $DIR/non_minimal_cfg.rs:12:7 | ||
| | ||
LL | #[cfg(all())] | ||
| ^^^^^ | ||
|
||
error: aborting due to 5 previous errors | ||
|