]> git.proxmox.com Git - rustc.git/blobdiff - src/test/run-pass/struct-order-of-eval-3.rs
Imported Upstream version 1.2.0+dfsg1
[rustc.git] / src / test / run-pass / struct-order-of-eval-3.rs
index 60f9c4465a01c8ff53c6a3a7afc9587e3122511f..b67eb205396b29cff30bdf088bc3877469b2c534 100644 (file)
@@ -11,8 +11,9 @@
 // Checks that functional-record-update order-of-eval is as expected
 // even when no Drop-implementations are involved.
 
+#![feature(const_fn)]
 
-use std::sync::atomic::{Ordering, AtomicUsize, ATOMIC_USIZE_INIT};
+use std::sync::atomic::{Ordering, AtomicUsize};
 
 struct W { wrapped: u32 }
 struct S { f0: W, _f1: i32 }
@@ -34,7 +35,7 @@ pub fn main() {
             "expect: 0x{:x} actual: 0x{:x}", expect, actual);
 }
 
-static LOG: AtomicUsize = ATOMIC_USIZE_INIT;
+static LOG: AtomicUsize = AtomicUsize::new(0);
 
 fn event_log() -> usize {
     LOG.load(Ordering::SeqCst)