Skip to content

Conversation

A4-Tacks
Copy link
Contributor

@A4-Tacks A4-Tacks commented Aug 26, 2025

Support let-chain to guard and fix some indent

Example

fn main() {
    if $0let true = true
        && true
        && false
    {
        code()
    }
}

->

fn main() {
    match true {
        true if true
            && false => code(),
        _ => (),
    }
}

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 26, 2025
Example
---
```rust
fn main() {
    if $0let true = true
        && true
        && false
    {
        code()
    }
}
```
```rust
fn main() {
    match true {
        true if true
            && false => code(),
        _ => (),
    }
}
```
@A4-Tacks A4-Tacks force-pushed the if-let-to-match-guard branch from 1669d88 to 0540e6f Compare September 6, 2025 09:21
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