rust-lang / rust-lang/rust-clippy
lint unreachable public items declared in private items
Open
Nobody has claimed this yet.
A-lint
- Dominant language
- Rust
- Stars
- 13.5k
- Forks
- 2.2k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 32
Description
What it does
Since the outer fn is private, we will not be reach the inner item from outside anyway
fn outer() {
pub fn inner() {} // remove the pub / pub(crate) here
}
Lint Name
unreachable_nested_pub ?
Category
complexity or style?
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 from the Rust example in the issue and review existing Clippy lint entry points and visibility-related lints. Define whether private outer functions make nested pub or pub(crate) declarations unreachable, choose the lint category and name, and add coverage for the shown case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100