rust-lang / rust-lang/rust-analyzer

"Fill match arms" not offered inside `tokio::select!` arm

Open
#21,453 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

rust-analyzer version: rust-analyzer 1.94.0-nightly (fecb335c 2026-01-07)

rustc version: rustc 1.94.0-nightly (fecb335cb 2026-01-07)

editor or extension: Neovim

The "Fill match arms" code action doesn't appear when the cursor is on a line strictly between the opening and closing braces of a match inside an arm of tokio's select! macro.

Repro:

async fn repro() {
    tokio::select! {
        () = async { } => {
            match Some(42) { // Works if the cursor is on this line.
                // Doesn't work if cursor is on this line.
            } // Works if the cursor is on this line.
        }
    }
}

Related: #3936

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 issue with the provided Rust example in Neovim and compare the code action at the opening brace, inside the match, and at the closing brace. Trace how rust-analyzer handles match-arm completion inside the tokio::select! arm, using related issue #3936 for context. Done means "Fill match arms" appears from the interior line as well.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.