rust-lang / rust-lang/rust-analyzer

The inline fn code action should import items.

Open
#17,879 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Currently it doesn't update the imports of the fn it's inlining.

Questions:

  • How should it handle non pub 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

Start by locating the inline fn code action and its existing tests. Trace how inlining currently handles the containing function's imports, then determine expected behavior for non-pub items from the issue's open question. Done means the code action updates imports correctly and its tests cover the supported visibility cases.

Written by the indexing model from the issue text.

Assessment

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