rust-lang / rust-lang/rust-analyzer

Add support for `use Trait::func`

Open
#17,304 7 comments 1 reaction 1 assignee View on GitHub

@mhatzl is already working on this.

Since May 6, 2025.

A-nameres B-unstable
Dominant language
Rust
Stars
16.9k
Forks
2.2k
Avg merge
1d 12h
Merged PRs (30d)
72

Description

https://github.com/rust-lang/rfcs/pull/3591 is likely to be introduced to the language, which will require some changes to our early name resolution, notably this change ties in trait assoc items into early name resolution so our corresponding DefMap query will have to collect and expand macros in trait assoc item position, replacing the current trait_data query. This will unfortunately slow down def map creation and also invalidate it when trait assoc item signatures are changed but that's just the nature of moving things into early nameres. OTOH this does get rid of one of the more frequent queries which might slightly reduce memory usage/or improve perf in other ways.

Note this hasn't been accepted yet so there is little reason to implement that right now.

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.