Skip to content

Conversation

@A4-Tacks
Copy link
Member

Example

fn foo() -> bool {
    let$0 Some(x) = Some(2) else { return false };
}

Before this PR:

fn foo() -> bool {
    let Some(Some(x)) = Some(2) else { return };
}

After this PR:

Assist not applicable

Example
---
```rust
fn foo() -> bool {
    let$0 Some(x) = Some(2) else { return false };
}
```

**Before this PR**:

```rust
fn foo() -> bool {
    let Some(Some(x)) = Some(2) else { return };
}
```

**After this PR**:

Assist not applicable
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 14, 2025
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 Oct 14, 2025
Merged via the queue into rust-lang:master with commit 6c3f962 Oct 14, 2025
15 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 14, 2025
@A4-Tacks A4-Tacks deleted the conv-to-guard-ret-exist-else branch October 14, 2025 07:54
@lnicola lnicola changed the title Fix applicable on let-else for convert_to_guarded_return fix: don't make convert_to_guarded_return applicable on let-else Oct 14, 2025
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