-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Suggestion for call on immutable binding of mutable type #83251
Conversation
(rust-highfive has picked a reviewer for you, use r? to override) |
r? @oli-obk |
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 |
@estebank judging by oli's previous comment i'm assuming there are changes expected here |
☔ The latest upstream changes (presumably #85100) made this pull request unmergeable. Please resolve the merge conflicts. |
Ping from triage: |
e439111
to
faf5dbd
Compare
Addressed comments, fixed rebase and fixed structured_suggestion (we currently incorrectly suggest removal of code, which is why this PR originally used |
@bors r+ rollup |
@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.
@bors r=oli-obk rollup |
📌 Commit b252b38a9f071c5ddaf10fb6f0abe7ccf0c3a7d5 has been approved by |
@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. Fix rust-lang#83241.
@bors r=oli-obk rollup |
📌 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.