Skip to content

Conversation

@A4-Tacks
Copy link
Member

Example

fn main() {
    let x = Some(1);
    let cond = true;
    if cond && x.is_som$0e() {}
}

Before this PR

Assist not applicable

After this PR

fn main() {
    let x = Some(1);
    let cond = true;
    if cond && let Some(${0:x1}) = x {}
}

Example
---
```rust
fn main() {
    let x = Some(1);
    let cond = true;
    if cond && x.is_som$0e() {}
}
```

**Before this PR**

Assist not applicable

**After this PR**

```rust
fn main() {
    let x = Some(1);
    let cond = true;
    if cond && let Some(${0:x1}) = x {}
}
```
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 26, 2025
@ShoyuVanilla ShoyuVanilla added this pull request to the merge queue Oct 26, 2025
Merged via the queue into rust-lang:master with commit 803ab10 Oct 26, 2025
15 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 26, 2025
@lnicola lnicola changed the title Fix not applicable on let-chain for replace_is_method_with_if_let_method fix: support let-chains in replace_is_method_with_if_let_method Oct 26, 2025
@A4-Tacks A4-Tacks deleted the if-let-chain-for-is-method-with-if-let branch October 27, 2025 07:09
mendelsshop pushed a commit to mendelsshop/rust-analyzer that referenced this pull request Oct 27, 2025
…method-with-if-let

Fix not applicable on let-chain for replace_is_method_with_if_let_method
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