rust-lang / rust-lang/rust-analyzer
Collapse runnable test lenses if a macro creates too many
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
Currently when a macro invocation creates more than one runnable test lens we give the lenses the functions name and still show them like here:

This works fine for a small number of lenses but can quickly become overwhelming, includeing bindgen output is a prime example for this:

Instead we should collapse these into one special lense that offers a selection on which test to run if a macro expands to X or more lenses.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the macro-expansion examples in the issue and tracing how runnable test lenses are generated and displayed. Determine the threshold for collapsing multiple lenses, then verify that a collapsed lens offers a test-selection menu and that small numbers of lenses retain their current behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- developer-experience, testing-qa
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100