Skip to content

Conversation

steveklabnik
Copy link
Contributor

Fixes #22032

@rust-highfive
Copy link
Contributor

r? @nikomatsakis

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

@alexcrichton
Copy link
Member

@bors: r+ e40d058 rollup

@reem
Copy link
Contributor

reem commented Feb 10, 2015

Is there a reason for this not to be checked at compile time, or just implementation effort?

@steveklabnik
Copy link
Contributor Author

@reem I asked @huonw if this was a bug or not, and he said that he hoped it wasn't checked, so maybe he can elaborate?

@huonw
Copy link
Contributor

huonw commented Feb 10, 2015

It doesn't seem to make sense to me for the alignment of the input value to matter for the output (the compiler just has to make sure the memory location storing the output has the right alignment), and it restricts things like transmuting SIMD types to/from arrays/tuples etc, and even say, (u8, u8)u16.

Manishearth added a commit to Manishearth/rust that referenced this pull request Feb 10, 2015
alexcrichton added a commit to alexcrichton/rust that referenced this pull request Feb 10, 2015
@bors bors merged commit e40d058 into rust-lang:master Feb 10, 2015
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.

Docs on std::mem::transmute incorrectly claim the types must have the same alignment
7 participants