rust/tests/compile-fail/atomic_non_integer_arithmetic.rs
2018-10-31 11:04:35 +01:00

10 lines
222 B
Rust

#![feature(core_intrinsics)]
pub fn main() {
let mut z: f64 = 1.0;
unsafe {
::std::intrinsics::atomic_xadd(&mut z, 2.0);
//~^ ERROR: Atomic arithmetic operations only work on integer types
}
}