Skip to content

Conversation

Kivooeo
Copy link
Member

@Kivooeo Kivooeo commented Oct 21, 2025

Fixes #147664

it does affect only cases where variable exist in scope, because if the variable is not exist in scope, the suggestion will not make any sense

I wanted to add suggestion for case where variable does not in scope to fix y += 1 to let y = 1 but I guess it's too much (not too much work, but too much wild predict of what user wants)? if it's good addition in your opinion I can add this in follow up

in other things I guess impl is pretty much self-explanatory, if you see there is some possibilities to improve code or/and some edge-cases that I could overlooked feel free to tell about it

ah, also about why I think this change is good and why I originally took it, so it seems to me that this is possible to make this typo (I explained this in comment a little), like, both + and = is the same button (in most of layouts) and for this reasons I didn't added something like -= it seems more harder to make this typo

r? diagnostics

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Oct 21, 2025
@Kivooeo
Copy link
Member Author

Kivooeo commented Oct 21, 2025

(info for assigned reviewer or whoever wants pick this up for review, if you found that this is in good state as it, and there is nothing crucial that needed to be added or improved, and you want to rollup this, please, before doing so run bors try on aarch64-msvc-1, i have some kind of paranoia after this #147421 (comment), thanks)

@rust-log-analyzer

This comment has been minimized.

@rust-cloud-vms rust-cloud-vms bot force-pushed the plus-equal-let-chains branch from 96dba30 to e4d765b Compare October 21, 2025 22:51
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. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

+= in a let chain gives bad errors

4 participants