rust-lang / rust-lang/rust-analyzer

Trait impl item completions should prioritize required items over optional ones

Open
#15,469 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-completion C-enhancement
Dominant language
Rust
Stars
16.9k
Forks
2.2k
Avg merge
1d 12h
Merged PRs (30d)
72

Description

struct S;

impl Iterator for S {
    $0
}

Requesting completions here currently lists fn all(...) and fn any(...) first. More useful first entries would be type Item = and fn next(...) (ie. required trait items should have higher priority than optional items).

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

Reproduce the completion request with the Iterator implementation example and confirm the ordering of required and optional items. Locate the trait-implementation completion entry point and its completion tests, then make required items appear first and verify the example's ordering in the relevant test coverage.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
devtools
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.