rust-lang / rust-lang/rust-analyzer
Feature request: Find trait usages
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
When a trait was imported to be able to call methods it defines, the only somewhat reliable way to find those calls (that I'm aware of) that make the import necessary is removing the import and seeing what breaks, which is not a very elegant solution.
Could RA highlight trait methods when the text cursor is on a trait import the same way it already highlights mentions of the trait itself, and/or provide cross-file "Find all trait usages" functionality?
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 clarifying whether the intended scope is highlighting trait-method calls from an import, cross-file “Find all trait usages,” or both; the issue does not name files, tests, or entry points. Done should make the selected trait-usage workflow discoverable and reliable across the relevant files, with behavior matching existing trait highlighting where applicable.
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
- 30/100