Skip to content
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

Amend RFC 1758 (repr(transparent)) w.r.t. repr(align) #2271

Merged
merged 1 commit into from
Jan 26, 2018

Conversation

hanna-kruppe
Copy link

The RFC made contradictory statements on whether repr(align(N)) can be combined with repr(transparent). Discussion on the tracking issue did not find a good reason to support it, so this commit makes the RFC internally consistent by prohibiting align(N) on transparent structs.

The RFC made contradictory statements on whether repr(align(N)) can be combined with repr(transparent). [Discussion on the tracking issue][discuss] did not find a good reason to support it, so this commit makes the RFC internally consistent by prohibiting align(N) on transparent structs.

[discuss]: rust-lang/rust#43036 (comment)
@Centril Centril added the T-lang Relevant to the language team, which will review and decide on the RFC. label Dec 29, 2017
@nikomatsakis
Copy link
Contributor

@rkruppe -- just to check, this matches what we implemented too?

@hanna-kruppe
Copy link
Author

Yes, rust-lang/rust#47158 reports an error if any other repr attribute is applied to a transparent struct.

@nikomatsakis
Copy link
Contributor

OK, I'm going to summarily merge. cc @rust-lang/lang

@nikomatsakis nikomatsakis merged commit 7b6cefe into rust-lang:master Jan 26, 2018
@Centril Centril added A-repr #[repr(...)] related proposals & ideas A-machine Proposals relating to Rust's abstract machine. labels Nov 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-machine Proposals relating to Rust's abstract machine. A-repr #[repr(...)] related proposals & ideas T-lang Relevant to the language team, which will review and decide on the RFC.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants