rust-lang / rust-lang/rust-analyzer

Feature request: unecessarily public item

Open
#15,855 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-diagnostics C-feature
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.