Skip to content

Conversation

A4-Tacks
Copy link
Contributor

Fixes:

  • applicable on underscore prefix parameter
  • using binding mode as an expression

Examples

fn foo($0_x: i32, y: i32) {}

Before this PR:

fn foo(_x: i32, y: i32) {
    let _ = _x;
}

After this PR:

Assist not applicable


fn foo(ref $0y: i32) {}

Before this PR:

fn foo(ref y: i32) {
    let _ = ref y;
}

After this PR:

fn foo(ref y: i32) {
    let _ = y;
}

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 22, 2025
Fixes:
- applicable on underscore prefix parameter
- using binding mode as an expression

Examples
---
```rust
fn foo($0_x: i32, y: i32) {}
```

**Before this PR**:

```rust
fn foo(_x: i32, y: i32) {
    let _ = _x;
}
```

**After this PR**:

Assist not applicable

---

```rust
fn foo(ref $0y: i32) {}
```

**Before this PR**:

```rust
fn foo(ref y: i32) {
    let _ = ref y;
}
```

**After this PR**:

```rust
fn foo(ref y: i32) {
    let _ = y;
}
```
@A4-Tacks A4-Tacks force-pushed the fix-bind-unused-applicable-underscore branch from 050810d to fef1ab5 Compare September 22, 2025 07:15
Copy link
Member

@ShoyuVanilla ShoyuVanilla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@ShoyuVanilla ShoyuVanilla added this pull request to the merge queue Sep 22, 2025
Merged via the queue into rust-lang:master with commit b465ae0 Sep 22, 2025
15 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 22, 2025
@A4-Tacks A4-Tacks deleted the fix-bind-unused-applicable-underscore branch September 22, 2025 23:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants