Skip to content

feat: offer on compound assign for replace_arith_op#22180

Merged
ChayimFriedman2 merged 1 commit intorust-lang:masterfrom
A4-Tacks:arith-assign
Apr 26, 2026
Merged

feat: offer on compound assign for replace_arith_op#22180
ChayimFriedman2 merged 1 commit intorust-lang:masterfrom
A4-Tacks:arith-assign

Conversation

@A4-Tacks
Copy link
Copy Markdown
Member

Example

fn main() {
    let mut x = 1;
    x $0+= 2;
}

Before this PR

Assist not applicable

After this PR

fn main() {
    let mut x = 1;
    x = x.wrapping_add(2);
}

Example
---
```rust
fn main() {
    let mut x = 1;
    x $0+= 2;
}
```

**Before this PR**

Assist not applicable

**After this PR**

```rust
fn main() {
    let mut x = 1;
    x = x.wrapping_add(2);
}
```
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 25, 2026
@ChayimFriedman2 ChayimFriedman2 added this pull request to the merge queue Apr 26, 2026
Merged via the queue into rust-lang:master with commit c171169 Apr 26, 2026
18 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 26, 2026
@A4-Tacks A4-Tacks deleted the arith-assign branch April 26, 2026 11:25
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