-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Explicit alignment in the type system #4578
Comments
Marking as maturity 4 since alignment is useful, but not required. Adding it should be backwards compatible unless it (for some reason) changes alignment rules. |
Nominating for production ready |
This would probably be implemented using intrinsics and attributes, rather than requiring language changes, I think. |
This is tangled up with the question of constant expressions. #5551 |
accepted for feature-complete milestone |
I think we would need the ability to add attributes to variable declarations for this to be practical. |
Seems like being able to specify specific alignments on struct types would be sufficient. |
Not a 1.0 blocker, P-low. (We think it sufficent to be able to put such attributes on struct fields and/or struct items themselves; if you need a stack local aligned, wrap it in such a struct.) |
#14006 implements proper alignment handling for heap allocations, so it's a lot more feasible to implement this as a property of types now. |
This issue has been moved to the RFCs repo: rust-lang/rfcs#282 |
See http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1507.htm and http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1397.htm
The text was updated successfully, but these errors were encountered: