Rename alloc::arc to alloc::sync, to match std::sync

This commit is contained in:
Simon Sapin
2018-06-15 04:07:09 +02:00
parent 3394fb7bb7
commit c7638edf52
4 changed files with 4 additions and 4 deletions

View File

@@ -40,7 +40,7 @@
//! //!
//! ## Atomically reference counted pointers //! ## Atomically reference counted pointers
//! //!
//! The [`Arc`](arc/index.html) type is the threadsafe equivalent of the `Rc` //! The [`Arc`](sync/index.html) type is the threadsafe equivalent of the `Rc`
//! type. It provides all the same functionality of `Rc`, except it requires //! type. It provides all the same functionality of `Rc`, except it requires
//! that the contained type `T` is shareable. Additionally, `Arc<T>` is itself //! that the contained type `T` is shareable. Additionally, `Arc<T>` is itself
//! sendable while `Rc<T>` is not. //! sendable while `Rc<T>` is not.
@@ -164,7 +164,7 @@ mod boxed {
mod boxed_test; mod boxed_test;
pub mod collections; pub mod collections;
#[cfg(target_has_atomic = "ptr")] #[cfg(target_has_atomic = "ptr")]
pub mod arc; pub mod sync;
pub mod rc; pub mod rc;
pub mod raw_vec; pub mod raw_vec;

View File

@@ -18,10 +18,10 @@ pub use self::if_arc::*;
#[cfg(target_has_atomic = "ptr")] #[cfg(target_has_atomic = "ptr")]
mod if_arc { mod if_arc {
use super::*; use super::*;
use arc::Arc;
use core::marker::PhantomData; use core::marker::PhantomData;
use core::mem; use core::mem;
use core::ptr::{self, NonNull}; use core::ptr::{self, NonNull};
use sync::Arc;
/// A way of waking up a specific task. /// A way of waking up a specific task.
/// ///

View File

@@ -18,7 +18,7 @@
#![stable(feature = "rust1", since = "1.0.0")] #![stable(feature = "rust1", since = "1.0.0")]
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
pub use alloc_crate::arc::{Arc, Weak}; pub use alloc_crate::sync::{Arc, Weak};
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
pub use core::sync::atomic; pub use core::sync::atomic;