Uh oh!
There was an error while loading. Please reload this page.
Make AtomicBool the same size as bool - #33579
Conversation
4a69546 to
222b551Comparealexcrichton
commented
May 13, 2016
alexcrichton
commented
May 13, 2016
Note that the libs team discussed this change during triage the other day and the conclusion was that we're amenable to this with the other recent changes to |
bors
commented
May 14, 2016
Make AtomicBool the same size as bool Reopening #32365 This allows `AtomicBool` to be transmuted to a `bool`, which makes it more consistent with the other atomic types. Note that this now guarantees that the atomic type will always contain a valid `bool` value, which wasn't the case before (due to `fetch_nand`). r? @alexcrichton
bors
commented
May 14, 2016
@Amanieu Is this a guarantee? Like, on all platforms, all compilers, AtomicBool can be transmuted to bool? Or just specific platforms? |
Amanieu
commented
May 16, 2016
As it is currently implemented, a transmute will work fine. However I am not sure whether we should make this guarantee to users. Note that currently, atomic-rs relies on |
alexcrichton
commented
May 16, 2016
When discussed with the libs team, the conclusion was that |
Reopening #32365
This allows
AtomicBoolto be transmuted to abool, which makes it more consistent with the other atomic types. Note that this now guarantees that the atomic type will always contain a validboolvalue, which wasn't the case before (due tofetch_nand).r? @alexcrichton