rust-lang / rust-lang/rust-clippy
`wildcard_imports` is triggered on generated code
Open
@Lovlace777 is already working on this.
Since Jun 13, 2026.
C-bug
good first issue
I-false-positive
- Dominant language
- Rust
- Stars
- 13.5k
- Forks
- 2.2k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 32
Description
Summary
It is often completely impractical to handle explicit imports in macro-generated code, especially when submodules are generated programmatically. Anything that comes from proc macro or located under #[automatically_derived] should be ignored by this lint.
Lint Name
wildcard_imports
Reproducer
No response
Version
rustc 1.97.0-nightly (20de910db 2026-05-02)
binary: rustc
commit-hash: 20de910db49d3476ccf49ea79a4b22e2b5dface0
commit-date: 2026-05-02
host: x86_64-unknown-linux-gnu
release: 1.97.0-nightly
LLVM version: 22.1.4
Additional Labels
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.