Uh oh!
There was an error while loading. Please reload this page.
Suggestion for call on immutable binding of mutable type - #83251
Conversation
rust-highfive
commented
Mar 18, 2021
(rust-highfive has picked a reviewer for you, use r? to override) |
estebank
commented
Mar 22, 2021
r? @oli-obk |
oli-obk
commented
Mar 23, 2021
All of the changed tests were a case where the previous suggestion was already applicable, and now still is. While the new version fixes the situation, it always does so by introducing another level of indirection that will immediately get autodereffed. I think this new suggestion should not apply if the expression is a borrow expression. Also we should probably have the test from the issue in the test suite, as it does cover a case that is not covered by any of the changed tests |
Dylan-DPC-zz
commented
Apr 9, 2021
@estebank judging by oli's previous comment i'm assuming there are changes expected here |
bors
commented
May 11, 2021
☔ The latest upstream changes (presumably #85100) made this pull request unmergeable. Please resolve the merge conflicts. |
JohnCSimon
commented
Aug 9, 2021
Ping from triage: |
e439111 to
faf5dbdCompareestebank
commented
Aug 9, 2021
Addressed comments, fixed rebase and fixed structured_suggestion (we currently incorrectly suggest removal of code, which is why this PR originally used |
oli-obk
commented
Aug 9, 2021
@bors r+ rollup |
camelid
commented
Aug 29, 2021
@oli-obk It seems that bors didn't pick up on your approval. Can you try again? |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
estebank
commented
Aug 29, 2021
@bors r=oli-obk rollup |
bors
commented
Aug 29, 2021
📌 Commit b252b38a9f071c5ddaf10fb6f0abe7ccf0c3a7d5 has been approved by |
estebank
commented
Aug 29, 2021
@bors r- This has old suggestion format, it'll fail to merge. |
When calling a method requiring a mutable self borrow on an inmutable to a mutable borrow of the type, suggest making the binding mutable. Fixrust-lang#83241.
estebank
commented
Aug 29, 2021
@bors r=oli-obk rollup |
bors
commented
Aug 29, 2021
📌 Commit 5b6f4b9 has been approved by |
…laumeGomez Rollup of 13 pull requests Successful merges: - rust-lang#80543 (Notify when an `I-prioritize` issue is closed or reopened) - rust-lang#83251 (Suggestion for call on immutable binding of mutable type) - rust-lang#85534 (add rustc-demangle assertion on mangled symbol) - rust-lang#88173 (Refactor Markdown length-limited summary implementation) - rust-lang#88349 (Add const and static TAIT tests) - rust-lang#88357 (add unsized coercion test) - rust-lang#88381 (Handle stack_t.ss_sp type change for DragonFlyBSD) - rust-lang#88387 (Remove vestigial rustfix tests.) - rust-lang#88396 (Bump vulnerable crates) - rust-lang#88407 (Fix formatting in release notes from 52a9883) - rust-lang#88411 (Remove `Session.if_let_suggestions`) - rust-lang#88417 (RELEASES.md: fix broken link) - rust-lang#88419 (Fix code blocks color in Ayu theme) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
When calling a method requiring a mutable self borrow on an inmutable
to a mutable borrow of the type, suggest making the binding mutable.
Fix#83241.