Closed
Description
Tracking issue for rust-lang/rfcs#1358
Metadata
Metadata
Assignees
Labels
Blocker: Approved by a merged RFC but not yet implemented.Blocker: Implemented in the nightly compiler and unstable.Category: An issue tracking the progress of sth. like the implementation of an RFCCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Relevant to the language team
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
kennytm commentedon Jun 28, 2016
heap::EMPTY
is currently defined as1
and is used as the address of reference to zero-sized types. Would it affect the program's correctness if we change the alignment of a ZST?cc #27700.
retep998 commentedon Jun 28, 2016
@kennytm That already is an issue without this RFC.
kennytm commentedon Jun 28, 2016
@retep998 Okay thanks. So it is entirely an issue of #27700.
whitequark commentedon Oct 5, 2016
Anyone else implementing this? I need it so I may give it a go.
mfarrugi commentedon Nov 17, 2016
What's the relationship of this issue to simd support #27731 (ie. the current way to accomplish this on nightly)?
Can/should this be implemented separately?
lu-zero commentedon Jan 5, 2017
@mfarrugi the two are related but not that much. SIMD usually works better on aligned data, but you need aligned data also when you use other kind of hardware features (dma engines for crypto, video decoding/encoding, etc). @whitequark got time to implement it? From what I can see the allocator now is taking an alignment so it should be not terrible to implement (I do not know the rust internals well enough to be confident in poking around this).
whitequark commentedon Jan 6, 2017
@lu-zero Ok let me give it another try. Rustbuild and (hopefully?) incremental compilation have made rustc hacking much less painful...
bitshifter commentedon Jan 14, 2017
@whitequark have started on this? I was interested and got a proof of concept working, so if you haven't started on it I could probably finish off what I'm doing and make a PR. I'd probably need some mentoring from someone, I haven't added a feature before.
whitequark commentedon Jan 14, 2017
@bitshifter not really, please go ahead!
102 remaining items
#[repr(align(x))]
attribute (RFC 1358) #47006bitshifter commentedon Dec 25, 2017
I've created a pull request for stabilization, I still need to update the reference. I wasn't planning on updating the book or rust by example as they don't appear to talk about
repr
hints.#[repr(align(x))]
attribute. rust-lang/reference#182bitshifter commentedon Dec 26, 2017
I have not updated the reference Attribute syntax grammar documentation as the new syntax is only used by
#[repr(align)]
and I thought it might be pretty confusing to include a grammar which is only used by one kind of attribute for now.refactor/sys: use FFI types consistently
whitequark commentedon Mar 30, 2018
I think this can be closed now since the attribute is stable.
gnzlbg commentedon Apr 13, 2018
@kennytm can this issue be closed?