Skip to content

Conversation

@A4-Tacks
Copy link
Member

@A4-Tacks A4-Tacks commented Nov 1, 2025

Unmerge else if into the else {}.

Example

fn foo() {
    if cond1 {
        xxx()
    } else if$0 cond2 {
        yyy()
    } else {
        zzz()
    }
}

->

fn foo() {
    if cond1 {
        xxx()
    } else {
        if cond2 {
            yyy()
        } else {
            zzz()
        }
    }
}

Unmerge `else if` into the `else {}`.

Example
---
```rust
fn foo() {
    if cond1 {
        xxx()
    } else if$0 cond2 {
        yyy()
    } else {
        zzz()
    }
}
```
->
```rust
fn foo() {
    if cond1 {
        xxx()
    } else {
        if cond2 {
            yyy()
        } else {
            zzz()
        }
    }
}
```
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 1, 2025
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