summary refs log tree commit diff
path: root/src/libcollectionstest
diff options
context:
space:
mode:
authorEduard Burtescu <edy.burt@gmail.com>2015-05-27 11:18:36 +0300
committerEduard Burtescu <edy.burt@gmail.com>2015-05-27 11:19:03 +0300
commit377b0900aede976b2d37a499bbd7b62c2e39b358 (patch)
treeb4a5a4431d36ed1a4e0a39c7d2ef2563ecac9bf4 /src/libcollectionstest
parent6e8e4f847c2ea02fec021ea15dfb2de6beac797a (diff)
downloadrust-377b0900aede976b2d37a499bbd7b62c2e39b358.tar.gz
rust-377b0900aede976b2d37a499bbd7b62c2e39b358.zip
Use `const fn` to abstract away the contents of UnsafeCell & friends.
Diffstat (limited to 'src/libcollectionstest')
-rw-r--r--src/libcollectionstest/vec.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libcollectionstest/vec.rs b/src/libcollectionstest/vec.rs
index ac9cf198d67..b4d3d0b1a22 100644
--- a/src/libcollectionstest/vec.rs
+++ b/src/libcollectionstest/vec.rs
@@ -399,7 +399,7 @@ fn test_map_in_place_zero_sized() {
 
 #[test]
 fn test_map_in_place_zero_drop_count() {
-    use std::sync::atomic::{AtomicUsize, Ordering, ATOMIC_USIZE_INIT};
+    use std::sync::atomic::{AtomicUsize, Ordering};
 
     #[derive(Clone, PartialEq, Debug)]
     struct Nothing;
@@ -413,7 +413,7 @@ fn test_map_in_place_zero_drop_count() {
         }
     }
     const NUM_ELEMENTS: usize = 2;
-    static DROP_COUNTER: AtomicUsize = ATOMIC_USIZE_INIT;
+    static DROP_COUNTER: AtomicUsize = AtomicUsize::new(0);
 
     let v = repeat(Nothing).take(NUM_ELEMENTS).collect::<Vec<_>>();