rust-lang / rust-lang/rust-analyzer

Merge imports merges with bonus "self"

Open
#10,660 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Merging imports shouldn't add anything for itself, but just reorganize currently present imports (just merge them).

While it's quite common that after the merge I see bouns "self::…" added before my current imports… and it's followed with tons of warnings and errors.

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

No file or test is named. Start by reproducing the merge-imports behavior in rust-analyzer and trace the import-merging entry point; use the issue discussion for context. Done means merging imports only reorganizes existing imports, does not add bonus self imports, and avoids the reported warnings and errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
tooling
Issue type
Bug
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.