-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add suggestion to reborrow mutable references when they're moved in a for loop #83945
Conversation
r? @estebank (rust-highfive has picked a reviewer for you, use r? to override) |
This is definitely a better diagnostic, but (as mentioned in the underlying issue) I wonder if it's not possible to fix the desugaring so that |
Even if |
To be completely clear, I did indeed mean to fix desugaring so that
Aye that's fair, although obviously it would also catch other scenarios too. |
@bors r+ rollup |
📌 Commit a775984 has been approved by |
Let's not close the reporting ticket on merge so that an alternative desugaring can be explored to make this code Just Work™️. |
Add suggestion to reborrow mutable references when they're moved in a for loop Address rust-lang#83924
Rollup of 8 pull requests Successful merges: - rust-lang#83476 (Add strong_count mutation methods to Rc) - rust-lang#83634 (Do not emit the advanced diagnostics on macros) - rust-lang#83816 (Trigger `unused_doc_comments` on macros at once) - rust-lang#83916 (Use AnonConst for asm! constants) - rust-lang#83935 (forbid `impl Trait` in generic param defaults) - rust-lang#83936 (Disable using non-ascii identifiers in extern blocks.) - rust-lang#83945 (Add suggestion to reborrow mutable references when they're moved in a for loop) - rust-lang#83954 (Do not ICE when closure is involved in Trait Alias Impl Trait) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Address #83924