This has been stable since 1.60.0: https://github.com/rust-lang/rust/pull/93824 The hard coded list is bound to go out of sync with rustc, especially when new targets get added. In fact it is already wildly out of sync. You currently only disable 64-bit atomics for 32bit arm, powerpc and mips, but a lot more targets like riscv32, sparc and thumb also don't support them: https://github.com/crossbeam-rs/crossbeam/blob/5fd21b032388c2e418c7306ba6149e1881943c31/no_atomic.rs#L19-L78 As rustc itself depends on crossbeam, this means it isn't possible to build rustc for targets lacking some atomics until a new crossbeam release with those new targets. Using cfg(target_has_atomic) will immediately work.
This has been stable since 1.60.0: https://github.com/rust-lang/rust/pull/93824 The hard coded list is bound to go out of sync with rustc, especially when new targets get added. In fact it is already wildly out of sync. You currently only disable 64-bit atomics for 32bit arm, powerpc and mips, but a lot more targets like riscv32, sparc and thumb also don't support them: https://github.com/crossbeam-rs/crossbeam/blob/5fd21b032388c2e418c7306ba6149e1881943c31/no_atomic.rs#L19-L78 As rustc itself depends on crossbeam, this means it isn't possible to build rustc for targets lacking some atomics until a new crossbeam release with those new targets. Using cfg(target_has_atomic) will immediately work.