-
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 dbc76a7
Showing
5 changed files
with
30 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,4 +11,7 @@ fn wasi() {} | |
#[cfg(all(unix, not(windows)))] | ||
fn the_end() {} | ||
|
||
#[cfg(any())] | ||
fn any() {} | ||
|
||
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 |
---|---|---|
|
@@ -11,4 +11,7 @@ fn wasi() {} | |
#[cfg(all(any(unix), all(not(windows))))] | ||
fn the_end() {} | ||
|
||
#[cfg(any())] | ||
fn any() {} | ||
|
||
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,6 @@ | ||
#![allow(unused)] | ||
|
||
#[cfg(all())] | ||
fn all() {} | ||
|
||
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,10 @@ | ||
error: unneeded sub `cfg` when there is no condition | ||
--> $DIR/non_minimal_cfg2.rs:3:7 | ||
| | ||
LL | #[cfg(all())] | ||
| ^^^^^ | ||
| | ||
= note: `-D clippy::non-minimal-cfg` implied by `-D warnings` | ||
|
||
error: aborting due to previous error | ||
|