Skip to content

Remove transmute from btree::node::Node::as_slices_internal_mut #27624

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

Merged
merged 1 commit into from
Aug 18, 2015
Merged

Remove transmute from btree::node::Node::as_slices_internal_mut #27624

merged 1 commit into from
Aug 18, 2015

Conversation

apasel422
Copy link
Contributor

Closes #27620.

@rust-highfive
Copy link
Contributor

r? @aturon

(rust_highfive has picked a reviewer for you, use r? to override)

@apasel422
Copy link
Contributor Author

r? @gankro

@rust-highfive rust-highfive assigned Gankra and unassigned aturon Aug 10, 2015
@apasel422 apasel422 changed the title Remove transmutes from btree Remove unnecessary transmutes from libcollections Aug 10, 2015
unsafe { mem::transmute(self.as_slices()) }
unsafe {(
slice::from_raw_parts_mut(*self.keys, self.len()),
slice::from_raw_parts_mut(*self.vals, self.len()),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this might be losing aliasing information in LLVM.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any suggestions?

@alexcrichton
Copy link
Member

cc #27252, there's a bit of duplication between these two

@bors
Copy link
Collaborator

bors commented Aug 10, 2015

☔ The latest upstream changes (presumably #27252) made this pull request unmergeable. Please resolve the merge conflicts.

@apasel422
Copy link
Contributor Author

Rebased.

@apasel422 apasel422 changed the title Remove unnecessary transmutes from libcollections Remove transmute from btree::node::Node::as_slices_internal_mut Aug 10, 2015
@apasel422
Copy link
Contributor Author

Does this need any further changes?

@Gankra
Copy link
Contributor

Gankra commented Aug 18, 2015

Oh whoops, I thought this has been accepted.

@bors r+

@bors
Copy link
Collaborator

bors commented Aug 18, 2015

📌 Commit 28d5d2f has been approved by Gankro

@bors
Copy link
Collaborator

bors commented Aug 18, 2015

⌛ Testing commit 28d5d2f with merge 6c11e4a...

bors added a commit that referenced this pull request Aug 18, 2015
@bors bors merged commit 28d5d2f into rust-lang:master Aug 18, 2015
@apasel422 apasel422 deleted the issue-27620 branch August 18, 2015 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants