loop {
let x = box();
- // Here we complain because the resulting region
- // of this borrow is the fn body as a whole.
+ // Here we complain because the resulting region
+ // of this borrow is the fn body as a whole.
y = borrow(x); //~ ERROR cannot root
assert!(*x == *y);
pub fn atomic_load(src: &int) -> int;
pub fn atomic_load_acq(src: &int) -> int;
-
+
pub fn atomic_store(dst: &mut int, val: int);
pub fn atomic_store_rel(dst: &mut int, val: int);
assert!(rusti::atomic_load(x) == 1);
*x = 5;
assert!(rusti::atomic_load_acq(x) == 5);
-
+
rusti::atomic_store(x,3);
assert!(*x == 3);
rusti::atomic_store_rel(x,1);