Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upExplicit alignment in the type system #4578
Comments
This comment has been minimized.
This comment has been minimized.
|
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. |
This comment has been minimized.
This comment has been minimized.
|
Nominating for production ready |
This comment has been minimized.
This comment has been minimized.
|
This would probably be implemented using intrinsics and attributes, rather than requiring language changes, I think. |
This comment has been minimized.
This comment has been minimized.
|
This is tangled up with the question of constant expressions. #5551 |
This comment has been minimized.
This comment has been minimized.
|
accepted for feature-complete milestone |
This comment has been minimized.
This comment has been minimized.
|
I think we would need the ability to add attributes to variable declarations for this to be practical. |
This comment has been minimized.
This comment has been minimized.
|
Seems like being able to specify specific alignments on struct types would be sufficient. |
This comment has been minimized.
This comment has been minimized.
|
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.) |
pnkfelix
added
P-low
and removed
P-high-untriaged
labels
Feb 6, 2014
This comment has been minimized.
This comment has been minimized.
|
#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 comment has been minimized.
This comment has been minimized.
|
This issue has been moved to the RFCs repo: rust-lang/rfcs#282 |
tuncer commentedJan 22, 2013
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