// Copyright 2018 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 or the MIT license // , at your // option. This file may not be copied, modified, or distributed // except according to those terms. #![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::()); }