librustc: Remove cross borrowing from mutable Boxes to &mut.#15171
Merged
bors merged 1 commit intorust-lang:masterfrom Jun 25, 2014
Merged
librustc: Remove cross borrowing from mutable Boxes to &mut.#15171bors merged 1 commit intorust-lang:masterfrom
Boxes to &mut.#15171bors merged 1 commit intorust-lang:masterfrom
Conversation
This will break code like:
fn f(x: &mut int) {}
let mut a = box 1i;
f(a);
Change it to:
fn f(x: &mut int) {}
let mut a = box 1i;
f(&mut *a);
RFC 33; issue rust-lang#10504.
[breaking-change]
Member
There was a problem hiding this comment.
Is this it? I was expecting some enum variants (from auto-adjustments) and a bunch more related code to be removed.
Contributor
Author
There was a problem hiding this comment.
We still need auto-adjustment for the LHS of .. I believe this is the only place where the thing we want to remove is checked, though I could be wrong of course…
Contributor
|
For the record: I made some measurements about Doing a plain Additional borrows in all the crate test harnesses: |
Member
|
@nick29581, you were a big proponent of |
BlockBlazeDev
added a commit
to BlockBlazeDev/rust-crypto
that referenced
this pull request
Aug 8, 2024
Reference: rust-lang/rust#15171. Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This will break code like:
Change it to:
RFC 33; issue #10504.
[breaking-change]
r? @brson