rust/tests/ui/intrinsics/intrinsic-atomics-cc.rs
2023-01-11 09:32:08 +00:00

13 lines
206 B
Rust

// run-pass
// aux-build:cci_intrinsic.rs
extern crate cci_intrinsic;
use cci_intrinsic::atomic_xchg_seqcst;
pub fn main() {
let mut x = 1;
atomic_xchg_seqcst(&mut x, 5);
assert_eq!(x, 5);
}