From dae48a07f34dcf714b3b57029f4e03a0b95a269e Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Fri, 10 Oct 2014 21:59:10 -0700 Subject: Register new snapshots Also convert a number of `static mut` to just a plain old `static` and remove some unsafe blocks. --- src/libcoretest/atomic.rs | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'src/libcoretest') diff --git a/src/libcoretest/atomic.rs b/src/libcoretest/atomic.rs index e8fae3fa6df..ab9c7ab9f11 100644 --- a/src/libcoretest/atomic.rs +++ b/src/libcoretest/atomic.rs @@ -69,15 +69,13 @@ fn int_xor() { assert_eq!(x.load(SeqCst), 0xf731 ^ 0x137f); } -static mut S_BOOL : AtomicBool = INIT_ATOMIC_BOOL; -static mut S_INT : AtomicInt = INIT_ATOMIC_INT; -static mut S_UINT : AtomicUint = INIT_ATOMIC_UINT; +static S_BOOL : AtomicBool = INIT_ATOMIC_BOOL; +static S_INT : AtomicInt = INIT_ATOMIC_INT; +static S_UINT : AtomicUint = INIT_ATOMIC_UINT; #[test] fn static_init() { - unsafe { - assert!(!S_BOOL.load(SeqCst)); - assert!(S_INT.load(SeqCst) == 0); - assert!(S_UINT.load(SeqCst) == 0); - } + assert!(!S_BOOL.load(SeqCst)); + assert!(S_INT.load(SeqCst) == 0); + assert!(S_UINT.load(SeqCst) == 0); } -- cgit 1.4.1-3-g733a5