rust-lang / rust-lang/rust-clippy
Ignore structs with doc(hidden) in exhaustive_structs lint
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 13.5k
- Forks
- 2.2k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 32
Description
Lint name: exhaustive_structs
I tried this code:
#[doc(hidden)]
pub struct Foo;
I expected to see this happen: No warning when the exhaustive_structs lint is enabled. The lint could/should consider structs with doc(hidden) private?
Instead, this happened: The lint emitted a warning.
Meta
clippy 0.1.54 (35fff69 2021-06-06)
rustc 1.54.0-nightly (35fff69d0 2021-06-06)
binary: rustc
commit-hash: 35fff69d043b1c0f5c29894e7f4b0da8b039c131
commit-date: 2021-06-06
host: x86_64-unknown-linux-gnu
release: 1.54.0-nightly
LLVM version: 12.0.1
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.
Research direction
Start by locating the implementation and tests for the exhaustive_structs lint in rust-clippy. Check how the lint identifies public structs and handles doc(hidden), then add a regression test for the shown struct. Done means a doc(hidden) struct no longer triggers the lint while existing exhaustive-struct checks remain covered.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100