-
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.
Auto merge of #11840 - GuillaumeGomez:improve-maybe_misused_cfg, r=bl…
…yxyas Improve maybe misused cfg Follow-up of the improvements that were suggested to me in #11821: * I unified the output to use the same terms. * I updated the code to prevent creating a new symbol. r? `@blyxyas` changelog: [`maybe_misued_cfg`]: Output and code improvements
- Loading branch information
Showing
4 changed files
with
25 additions
and
24 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,53 +1,53 @@ | ||
error: feature may misspelled as features | ||
error: 'feature' may be misspelled as 'features' | ||
--> $DIR/cfg_features.rs:4:11 | ||
| | ||
LL | #[cfg(features = "not-really-a-feature")] | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `feature = "not-really-a-feature"` | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: did you mean: `feature = "not-really-a-feature"` | ||
| | ||
= note: `-D clippy::maybe-misused-cfg` implied by `-D warnings` | ||
= help: to override `-D warnings` add `#[allow(clippy::maybe_misused_cfg)]` | ||
|
||
error: feature may misspelled as features | ||
error: 'feature' may be misspelled as 'features' | ||
--> $DIR/cfg_features.rs:9:34 | ||
| | ||
LL | #[cfg(all(feature = "right", features = "wrong"))] | ||
| ^^^^^^^^^^^^^^^^^^ help: use: `feature = "wrong"` | ||
| ^^^^^^^^^^^^^^^^^^ help: did you mean: `feature = "wrong"` | ||
|
||
error: feature may misspelled as features | ||
error: 'feature' may be misspelled as 'features' | ||
--> $DIR/cfg_features.rs:13:15 | ||
| | ||
LL | #[cfg(all(features = "wrong1", any(feature = "right", features = "wrong2", feature, features)))] | ||
| ^^^^^^^^^^^^^^^^^^^ help: use: `feature = "wrong1"` | ||
| ^^^^^^^^^^^^^^^^^^^ help: did you mean: `feature = "wrong1"` | ||
|
||
error: feature may misspelled as features | ||
error: 'feature' may be misspelled as 'features' | ||
--> $DIR/cfg_features.rs:13:59 | ||
| | ||
LL | #[cfg(all(features = "wrong1", any(feature = "right", features = "wrong2", feature, features)))] | ||
| ^^^^^^^^^^^^^^^^^^^ help: use: `feature = "wrong2"` | ||
| ^^^^^^^^^^^^^^^^^^^ help: did you mean: `feature = "wrong2"` | ||
|
||
error: 'test' may be misspelled as 'tests' | ||
--> $DIR/cfg_features.rs:18:11 | ||
| | ||
LL | #[cfg(tests)] | ||
| ^^^^^ help: do you mean: `test` | ||
| ^^^^^ help: did you mean: `test` | ||
|
||
error: 'test' may be misspelled as 'Test' | ||
--> $DIR/cfg_features.rs:21:11 | ||
| | ||
LL | #[cfg(Test)] | ||
| ^^^^ help: do you mean: `test` | ||
| ^^^^ help: did you mean: `test` | ||
|
||
error: 'test' may be misspelled as 'tests' | ||
--> $DIR/cfg_features.rs:25:15 | ||
| | ||
LL | #[cfg(all(tests, Test))] | ||
| ^^^^^ help: do you mean: `test` | ||
| ^^^^^ help: did you mean: `test` | ||
|
||
error: 'test' may be misspelled as 'Test' | ||
--> $DIR/cfg_features.rs:25:22 | ||
| | ||
LL | #[cfg(all(tests, Test))] | ||
| ^^^^ help: do you mean: `test` | ||
| ^^^^ help: did you mean: `test` | ||
|
||
error: aborting due to 8 previous errors | ||
|