Skip to content

Transmute cleanup#18318

Merged
bors merged 2 commits into
rust-lang:masterfrom
arielb1:transmute-cleanup
Nov 4, 2014
Merged

Transmute cleanup#18318
bors merged 2 commits into
rust-lang:masterfrom
arielb1:transmute-cleanup

Conversation

@arielb1

@arielb1 arielb1 commented Oct 25, 2014

Copy link
Copy Markdown
Contributor

clean-up transmutes in librustc and libsyntax

@rust-highfive

Copy link
Copy Markdown
Contributor

warning Warning warning

  • These commits modify unsafe code. Please review it carefully!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Whoa, so glad to see this gone 😍

@eddyb

eddyb commented Oct 26, 2014

Copy link
Copy Markdown
Contributor

LGTM, but there's enough unsafe code here that I'd like a second look.
cc @pcwalton @nikomatsakis @pnkfelix

Comment thread src/librustc/metadata/loader.rs Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This doesn't need to be a transmute a simple as cast should work.

@arielb1

arielb1 commented Oct 27, 2014

Copy link
Copy Markdown
Contributor Author

Some of the transmutes here are DST-related and are waiting for a new snapshot with #17178.

@nikomatsakis

Copy link
Copy Markdown
Contributor

@arielb1 should the r+ be removed until new snapshot lands?

@arielb1

arielb1 commented Oct 28, 2014

Copy link
Copy Markdown
Contributor Author

@nikomatsakis

This PR is snapshot-independent. Some further cleanup is waiting on #18291.

@nikomatsakis

Copy link
Copy Markdown
Contributor

@arielb1 looks like this needs to be rebased

None of them would break by implementation-defined struct layout, but
one would break with strict lifetime aliasing, and the rest are just
ugly code.
alexcrichton added a commit to alexcrichton/rust that referenced this pull request Nov 4, 2014
@bors bors merged commit a87078a into rust-lang:master Nov 4, 2014
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.

6 participants