rust-lang / rust-lang/rust-analyzer

Feature request: Find trait usages

Open
#10,472 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-assists C-feature S-actionable
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

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.