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 upMake AtomicBool the same size as bool #33579
Conversation
rust-highfive
assigned
alexcrichton
May 12, 2016
Amanieu
force-pushed the
Amanieu:atomic_bool2
branch
2 times, most recently
from
4a69546
to
222b551
May 12, 2016
Amanieu
force-pushed the
Amanieu:atomic_bool2
branch
from
222b551
to
915fa57
May 13, 2016
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
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 |
This comment has been minimized.
This comment has been minimized.
bors
added a commit
that referenced
this pull request
May 14, 2016
This comment has been minimized.
This comment has been minimized.
bors
merged commit 915fa57
into
rust-lang:master
May 14, 2016
This comment has been minimized.
This comment has been minimized.
|
@Amanieu Is this a guarantee? Like, on all platforms, all compilers, AtomicBool can be transmuted to bool? Or just specific platforms? |
This comment has been minimized.
This comment has been minimized.
|
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 |
This comment has been minimized.
This comment has been minimized.
|
When discussed with the libs team, the conclusion was that |
Amanieu commentedMay 12, 2016
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