rust-lang / rust-lang/rust-analyzer

Feature request: Expand macro single step

Open
#11,888 7 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

We already have the "Expand macro recursively" action, which is useful for seeing what a macro eventually expands to if it successfully expands. However, for debugging e.g. tt muncher macros, it can be very useful to expand a single step in macro expansion, to track how the macro processes along the way.

A key feature is that it can't just show the first level of expansion, it also has to be possible to choose any macros in the output and expand those (a single step).

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 existing "Expand macro recursively" action and its expansion flow. The feature is done when it can display one macro-expansion step and let users select macros in that output for further single-step expansion.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
devtools
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.