Skip to content

fix: fill match arms on last comma and empty expr#21822

Open
A4-Tacks wants to merge 1 commit intorust-lang:masterfrom
A4-Tacks:tail-offer-fill-match-arm
Open

fix: fill match arms on last comma and empty expr#21822
A4-Tacks wants to merge 1 commit intorust-lang:masterfrom
A4-Tacks:tail-offer-fill-match-arm

Conversation

@A4-Tacks
Copy link
Member

@A4-Tacks A4-Tacks commented Mar 15, 2026

For Vim, triggering code action at the end of line usually occurs before the last character rather than after it

Example

fn foo() {
    match Some(2) {
        Some(_) => ()$0,
    }
}

Before this PR

Assist not applicable

After this PR

fn foo() {
    match Some(2) {
        Some(_) => (),
        None => ${1:todo!()},$0
    }
}

Example
---
```rust
fn foo() {
    match Some(2) {
        Some(_) => ()$0,
    }
}
```

**Before this PR**

Assist not applicable

**After this PR**

```rust
fn foo() {
    match Some(2) {
        Some(_) => (),
        None => ${1:todo!()},$0
    }
}
```
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants