#![feature(cfg_target_has_atomic)] #![feature(integer_atomics)] use std::mem::{align_of, size_of}; use std::sync::atomic::*; fn main() { #[cfg(target_has_atomic = "8")] assert_eq!(align_of::(), size_of::()); #[cfg(target_has_atomic = "ptr")] assert_eq!(align_of::>(), size_of::>()); #[cfg(target_has_atomic = "8")] assert_eq!(align_of::(), size_of::()); #[cfg(target_has_atomic = "8")] assert_eq!(align_of::(), size_of::()); #[cfg(target_has_atomic = "16")] assert_eq!(align_of::(), size_of::()); #[cfg(target_has_atomic = "16")] assert_eq!(align_of::(), size_of::()); #[cfg(target_has_atomic = "32")] assert_eq!(align_of::(), size_of::()); #[cfg(target_has_atomic = "32")] assert_eq!(align_of::(), size_of::()); #[cfg(target_has_atomic = "64")] assert_eq!(align_of::(), size_of::()); #[cfg(target_has_atomic = "64")] assert_eq!(align_of::(), size_of::()); #[cfg(target_has_atomic = "128")] assert_eq!(align_of::(), size_of::()); #[cfg(target_has_atomic = "128")] assert_eq!(align_of::(), size_of::()); #[cfg(target_has_atomic = "ptr")] assert_eq!(align_of::(), size_of::()); #[cfg(target_has_atomic = "ptr")] assert_eq!(align_of::(), size_of::()); }