Skip to content

Conversation

@A4-Tacks
Copy link
Member

Fix not applicable in statement when exist else block

Example

fn main() {
    some_statements();
    if$0 let Ok(x) = Err(92) {
        foo(x);
    } else {
        return;
    }
    some_statements();
}

Before this PR

Assist not applicable

After this PR

fn main() {
    some_statements();
    let Ok(x) = Err(92) else {
        return;
    };
    foo(x);
    some_statements();
}

Fix not applicable in statement when exist else block

Example
---
```rust
fn main() {
    some_statements();
    if$0 let Ok(x) = Err(92) {
        foo(x);
    } else {
        return;
    }
    some_statements();
}
```

**Before this PR**

Assist not applicable

**After this PR**

```rust
fn main() {
    some_statements();
    let Ok(x) = Err(92) else {
        return;
    };
    foo(x);
    some_statements();
}
```
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 31, 2025
@A4-Tacks A4-Tacks mentioned this pull request Nov 19, 2025
41 tasks
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