Skip to content

Conversation

A4-Tacks
Copy link
Contributor

Assist: expand_tuple_rest_pattern

Fills fields by replacing rest pattern in tuple patterns.

Example

fn foo(bar: (char, i32, i32)) {
    let (ch, ..$0) = bar;
}

->

fn foo(bar: (char, i32, i32)) {
    let (ch, _1, _2) = bar;
}

Assist: expand_slice_rest_pattern

Fills fields by replacing rest pattern in slice patterns.

Example

fn foo(bar: [i32; 3]) {
    let [first, ..$0] = bar;
}

->

fn foo(bar: [i32; 3]) {
    let [first, _1, _2] = bar;
}

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 23, 2025
Assist: expand_tuple_rest_pattern

Fills fields by replacing rest pattern in tuple patterns.

Example
---
```
fn foo(bar: (char, i32, i32)) {
    let (ch, ..$0) = bar;
}
```
->
```
fn foo(bar: (char, i32, i32)) {
    let (ch, _1, _2) = bar;
}
```

---

Assist: expand_slice_rest_pattern

Fills fields by replacing rest pattern in slice patterns.

Example
---
```
fn foo(bar: [i32; 3]) {
    let [first, ..$0] = bar;
}
```
->
```
fn foo(bar: [i32; 3]) {
    let [first, _1, _2] = bar;
}
```
@A4-Tacks A4-Tacks force-pushed the expand-rest-pat-in-tuple-slice-pat branch from 0f485fb to b86bbdd Compare September 23, 2025 05:53
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