rust-lang / rust-lang/rust-analyzer
Feature request: unecessarily public item
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
Lint items that are exported as pub, but are not used outside of the module they are defined in. Likely in the pedantic category, and needs some heuristic to avoid linting items that are intended to be exported to other crates (eg don't lint on items defined in/reexported in lib.rs or prelude.rs)
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 pedantic lint implementations and how rust-analyzer determines whether a pub item is used outside its defining module. Evaluate the proposed exclusions for items defined in or reexported in lib.rs or prelude.rs, and consider how the heuristic should avoid intended cross-crate exports. Done means the lint identifies unnecessarily public items without flagging those intended for external use.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100