rust-lang / rust-lang/rust-analyzer

Unelide lifetimes assist

Open
#17,797 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

We should have an assist that unelides lifetimes in a function, inserting them all and having snippets pre-selecting them. Given we lack proper support of lifetimes in hir and mapping them back this is currently a bit trickly to implement / needs to be fully syntax based. So probably rather annoying to implement currently

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 investigating rust-analyzer's lifetime support in HIR and how assists map syntax, since the issue identifies these as the main implementation constraints. Done means an assist can unelide all lifetimes in a function and provide snippets that pre-select the inserted lifetimes.

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
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.