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

Explicit alignment in the type system #4578

Closed
tuncer opened this Issue Jan 22, 2013 · 10 comments

Comments

Projects
None yet
8 participants
@Aatch

This comment has been minimized.

Copy link
Contributor

Aatch commented Apr 29, 2013

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.

@cmr

This comment has been minimized.

Copy link
Member

cmr commented Aug 5, 2013

Nominating for production ready

@cmr

This comment has been minimized.

Copy link
Member

cmr commented Aug 5, 2013

This would probably be implemented using intrinsics and attributes, rather than requiring language changes, I think.

@graydon

This comment has been minimized.

Copy link
Contributor

graydon commented Aug 8, 2013

This is tangled up with the question of constant expressions. #5551

@graydon

This comment has been minimized.

Copy link
Contributor

graydon commented Aug 8, 2013

accepted for feature-complete milestone

@thestinger

This comment has been minimized.

Copy link
Contributor

thestinger commented Nov 3, 2013

I think we would need the ability to add attributes to variable declarations for this to be practical.

@nikomatsakis

This comment has been minimized.

Copy link
Contributor

nikomatsakis commented Nov 3, 2013

Seems like being able to specify specific alignments on struct types would be sufficient.

@pnkfelix

This comment has been minimized.

Copy link
Member

pnkfelix commented Feb 6, 2014

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 pnkfelix added P-low and removed P-high-untriaged labels Feb 6, 2014

@thestinger

This comment has been minimized.

Copy link
Contributor

thestinger commented May 7, 2014

#14006 implements proper alignment handling for heap allocations, so it's a lot more feasible to implement this as a property of types now.

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

rust-highfive commented Sep 24, 2014

This issue has been moved to the RFCs repo: rust-lang/rfcs#282

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.