about summary refs log tree commit diff
path: root/src/libcoretest
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-10-10 21:59:10 -0700
committerAlex Crichton <alex@alexcrichton.com>2014-10-10 22:09:49 -0700
commitdae48a07f34dcf714b3b57029f4e03a0b95a269e (patch)
tree4ced3fe4c6c167508f0f7d1308473dfec676846d /src/libcoretest
parent1add4dedc131d5f98d82feafe80d92ed1f3f6d49 (diff)
downloadrust-dae48a07f34dcf714b3b57029f4e03a0b95a269e.tar.gz
rust-dae48a07f34dcf714b3b57029f4e03a0b95a269e.zip
Register new snapshots
Also convert a number of `static mut` to just a plain old `static` and remove
some unsafe blocks.
Diffstat (limited to 'src/libcoretest')
-rw-r--r--src/libcoretest/atomic.rs14
1 files changed, 6 insertions, 8 deletions
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);
 }