diff options
| author | Mark Rousskov <mark.simulacrum@gmail.com> | 2019-01-26 09:14:49 -0700 |
|---|---|---|
| committer | Mark Rousskov <mark.simulacrum@gmail.com> | 2019-01-26 15:27:38 -0700 |
| commit | 7a58c6d1deec25c37c93ae4cf9ec2432918bc360 (patch) | |
| tree | 9f3c97f64498d562b514adeae98bedd1fe3f95a3 /src/libstd/alloc.rs | |
| parent | abe36c4741e780ba3ed3e9b48d823ac8007f786a (diff) | |
| download | rust-7a58c6d1deec25c37c93ae4cf9ec2432918bc360.tar.gz rust-7a58c6d1deec25c37c93ae4cf9ec2432918bc360.zip | |
Replace deprecated ATOMIC_INIT consts
Diffstat (limited to 'src/libstd/alloc.rs')
| -rw-r--r-- | src/libstd/alloc.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/alloc.rs b/src/libstd/alloc.rs index 537f56a8da7..8b6e5680c2d 100644 --- a/src/libstd/alloc.rs +++ b/src/libstd/alloc.rs @@ -95,11 +95,11 @@ pub use alloc_crate::alloc::*; /// /// ```rust /// use std::alloc::{System, GlobalAlloc, Layout}; -/// use std::sync::atomic::{AtomicUsize, ATOMIC_USIZE_INIT, Ordering::SeqCst}; +/// use std::sync::atomic::{AtomicUsize, Ordering::SeqCst}; /// /// struct Counter; /// -/// static ALLOCATED: AtomicUsize = ATOMIC_USIZE_INIT; +/// static ALLOCATED: AtomicUsize = AtomicUsize::new(0); /// /// unsafe impl GlobalAlloc for Counter { /// unsafe fn alloc(&self, layout: Layout) -> *mut u8 { |
