// compare_exchange has two results and is bound with `let (old, exchanged) = …`. // expect: reject E7006 // phase: 6 // spec: docs/spec/15-source-language.md module demo.exchange_as_value fn main() -> u64 effects [atomic] { let c = atomic.new(1u64); let v = atomic.compare_exchange(ref c, 1u64, 2u64, seq_cst, seq_cst); atomic.take(move c) }