You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Tracking Issue for cfg_target_has_atomic_equal_alignment #93822
This is a tracking issue for the target_has_atomic_equal_alignment CFG flag which was added in #76965 for Atomic*::from_mut.
It indicates whether an AtomicX has the same alignment as the equivalent X integer type. On some 32-bit platforms (e.g. x86) AtomicI64 has an alignment of 8 while i64 is only aligned to 4 bytes.
Potential design concerns:
Open question of whether a dedicated cfg is necessary over cfg(accessible) on the from_mut method specifically, which is what is currently gated on this cfg
It is currently blocking stabilization of atomic_from_mut feature (Atomic*::{from_mut, from_mut_slice, get_mut_slice}), as from_mut and from_mut_slice use this cfg and users would need to gate their uses on the same cfg.
Open question of whether a dedicated cfg is necessary over cfg(accessible) on the from_mut method specifically, which is what is currently gated on this cfg
It appears cfg(accessible) is still nowhere near to being stable and I don't see the reason to block this on it.
Closing as this is stabilized (in #155006) and documented in the reference (rust-lang/reference#2273). I don't think there's anything further to do here.
Activity
Rollup merge of rust-lang#93824 - Amanieu:stable_cfg_target_has_atomi…
WaffleLapkin commentedon Apr 6, 2026
T-lang nomination
I would like to suggest stabilizing this feature.
It is currently blocking stabilization of
atomic_from_mutfeature (Atomic*::{from_mut, from_mut_slice, get_mut_slice}), asfrom_mutandfrom_mut_sliceuse thiscfgand users would need to gate their uses on the samecfg.It appears
cfg(accessible)is still nowhere near to being stable and I don't see the reason to block this on it.joshtriplett commentedon Apr 8, 2026
@WaffleLapkin We discussed this in today's @rust-lang/lang meeting.
Please do post a stabilization PR for this, and we'll FCP it.
Rollup merge of rust-lang#155006 - WaffleLapkin:stabilize_cfg_target_…
Unrolled build for #155006
Document target_has_atomic_primitive_alignment
Rollup merge of #155006 - WaffleLapkin:stabilize_cfg_target_has_atomi…
Mark-Simulacrum commentedon Jun 16, 2026
Closing as this is stabilized (in #155006) and documented in the reference (rust-lang/reference#2273). I don't think there's anything further to do here.