rust-lang / rust-lang/rust-analyzer

Automatic addition of generics

Open
#12,531 0 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

When I add a new generic parameter to some struct, I need to go to every reference of that struct and add a generic here, even if it is unbounded. It would be much easier to use a quick-fix to add just the new generic type to all the references, and then go through some of them manually to add bounds if the compiler is complaining.

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 reproducing the workflow described: add a generic parameter to a struct and inspect its references. Identify how a quick-fix could add the new unbounded generic type to every reference, then verify that users can add bounds manually where compilation reports errors. No files or tests are named in the issue.

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
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.