-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add more test cases & improve docs & replace
Vec
with FxHashSet
f…
…or segments
- Loading branch information
Showing
9 changed files
with
92 additions
and
14 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
warn-on-all-wildcard-imports = true | ||
|
||
# This should be ignored since `warn-on-all-wildcard-imports` has higher precedence | ||
ignored-wildcard-imports = ["utils"] |
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,11 +1,23 @@ | ||
error: usage of wildcard import | ||
--> $DIR/wildcard_imports.rs:6:5 | ||
--> $DIR/wildcard_imports.rs:18:5 | ||
| | ||
LL | use prelude::*; | ||
| ^^^^^^^^^^ help: try: `prelude::FOO` | ||
LL | use utils::*; | ||
| ^^^^^^^^ help: try: `utils::{BAR, print}` | ||
| | ||
= note: `-D clippy::wildcard-imports` implied by `-D warnings` | ||
= help: to override `-D warnings` add `#[allow(clippy::wildcard_imports)]` | ||
|
||
error: aborting due to 1 previous error | ||
error: usage of wildcard import | ||
--> $DIR/wildcard_imports.rs:20:5 | ||
| | ||
LL | use my_crate::utils::*; | ||
| ^^^^^^^^^^^^^^^^^^ help: try: `my_crate::utils::my_util_fn` | ||
|
||
error: usage of wildcard import | ||
--> $DIR/wildcard_imports.rs:22:5 | ||
| | ||
LL | use prelude::*; | ||
| ^^^^^^^^^^ help: try: `prelude::FOO` | ||
|
||
error: aborting due to 3 previous errors | ||
|
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
2 changes: 1 addition & 1 deletion
2
tests/ui-toml/wildcard_imports_whitelist/wildcard_imports.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