Skip to content

feat: offer on let-expr for inline_local_variable#21775

Open
A4-Tacks wants to merge 1 commit intorust-lang:masterfrom
A4-Tacks:inline-let-expr
Open

feat: offer on let-expr for inline_local_variable#21775
A4-Tacks wants to merge 1 commit intorust-lang:masterfrom
A4-Tacks:inline-let-expr

Conversation

@A4-Tacks
Copy link
Member

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

Example

fn f() {
    if true
        && let xyz = 0
    {
        xyz$0;
    }
}

Before this PR

Assist not applicable

After this PR

fn f() {
    if true
    {
        0;
    }
}

Example
---
```rust
fn f() {
    if true
        && let xyz = 0
    {
        xyz$0;
    }
}
```

**Before this PR**

Assist not applicable

**After this PR**

```rust
fn f() {
    if true
    {
        0;
    }
}
```
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 7, 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