clippy::wildcard_imports
triggers for use super::super::*;
under a module in a tests.rs
#10580
Labels
C-bug
Category: Clippy is not doing the correct thing
I-false-positive
Issue: The lint was triggered on code it shouldn't have
L-pedantic
Lint: Belongs in the pedantic lint group
Summary
If you use modules to sort your tests under a
tests.rs
file, Clippy can trigger a false positive if you useuse super::super::*;
. This even includes if you're using it to import items from within thetests.rs
file.Lint Name
clippy::wildcard_imports
Reproducer
I tried this code:
/src/lib.rs
/src/tests.rs
I saw this happen (make sure you execute
cargo clippy --tests
to compile the tests):I expected to see this happen:
(No warning)
Version
Additional Labels
@rustbot label +L-pedantic
The text was updated successfully, but these errors were encountered: