diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2014-05-13 16:10:05 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-05-17 21:52:23 -0700 |
| commit | 639759b7f46b2ea7fd93cbfdb6fa39ab24f8774f (patch) | |
| tree | c6c817beed1f623f9d933326c75e0a45e6f196c9 /src/libstd/lib.rs | |
| parent | 3da5a5cd18dc2a2177160772725946c3b4512f7c (diff) | |
| download | rust-639759b7f46b2ea7fd93cbfdb6fa39ab24f8774f.tar.gz rust-639759b7f46b2ea7fd93cbfdb6fa39ab24f8774f.zip | |
std: Refactor liballoc out of lib{std,sync}
This commit is part of the libstd facade RFC, issue #13851. This creates a new library, liballoc, which is intended to be the core allocation library for all of Rust. It is pinned on the basic assumption that an allocation failure is an abort or failure. This module has inherited the heap/libc_heap modules from std::rt, the owned/rc modules from std, and the arc module from libsync. These three pointers are currently the three most core pointer implementations in Rust. The UnsafeArc type in std::sync should be considered deprecated and replaced by Arc<Unsafe<T>>. This commit does not currently migrate to this type, but future commits will continue this refactoring.
Diffstat (limited to 'src/libstd/lib.rs')
| -rw-r--r-- | src/libstd/lib.rs | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs index 119cd9aa2ca..a45f8a83a24 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -124,21 +124,21 @@ // Make and rand accessible for benchmarking/testcases #[cfg(test)] extern crate rand; -extern crate libc; +extern crate alloc; extern crate core; +extern crate libc; // Make std testable by not duplicating lang items. See #2912 #[cfg(test)] extern crate realstd = "std"; -#[cfg(test)] pub use kinds = realstd::kinds; -#[cfg(test)] pub use ops = realstd::ops; -#[cfg(test)] pub use cmp = realstd::cmp; -#[cfg(test)] pub use ty = realstd::ty; -#[cfg(test)] pub use owned = realstd::owned; +#[cfg(test)] pub use realstd::kinds; +#[cfg(test)] pub use realstd::ops; +#[cfg(test)] pub use realstd::cmp; +#[cfg(test)] pub use realstd::ty; -#[cfg(not(test))] pub use cmp = core::cmp; -#[cfg(not(test))] pub use kinds = core::kinds; -#[cfg(not(test))] pub use ops = core::ops; -#[cfg(not(test))] pub use ty = core::ty; +#[cfg(not(test))] pub use core::cmp; +#[cfg(not(test))] pub use core::kinds; +#[cfg(not(test))] pub use core::ops; +#[cfg(not(test))] pub use core::ty; pub use core::any; pub use core::bool; @@ -155,6 +155,9 @@ pub use core::raw; pub use core::tuple; pub use core::result; +pub use alloc::owned; +pub use alloc::rc; + // Run tests with libgreen instead of libnative. // // FIXME: This egregiously hacks around starting the test runner in a different @@ -205,10 +208,7 @@ pub mod strbuf; pub mod ascii; -pub mod rc; pub mod gc; -#[cfg(not(test))] -pub mod owned; /* Common traits */ |
