diff options
| author | bors <bors@rust-lang.org> | 2015-01-06 08:25:32 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-01-06 08:25:32 +0000 |
| commit | 340ac040f7603e169a3739c65956ed2213622be5 (patch) | |
| tree | 0502e3fcb9ceaa41d36c707e95baf0d7740fc3fd /src/liballoc | |
| parent | c7dd3c4d69aee1c4ad8cc220c194b176bba2ab62 (diff) | |
| parent | 4b359e3aeeaf97a190c5a7ecff8815b7b5734ece (diff) | |
| download | rust-340ac040f7603e169a3739c65956ed2213622be5.tar.gz rust-340ac040f7603e169a3739c65956ed2213622be5.zip | |
auto merge of #20610 : alexcrichton/rust/rollup, r=alexcrichton
Diffstat (limited to 'src/liballoc')
| -rw-r--r-- | src/liballoc/arc.rs | 6 | ||||
| -rw-r--r-- | src/liballoc/boxed.rs | 18 | ||||
| -rw-r--r-- | src/liballoc/lib.rs | 23 | ||||
| -rw-r--r-- | src/liballoc/rc.rs | 6 |
4 files changed, 37 insertions, 16 deletions
diff --git a/src/liballoc/arc.rs b/src/liballoc/arc.rs index 88f02d6573e..25f80ad11bd 100644 --- a/src/liballoc/arc.rs +++ b/src/liballoc/arc.rs @@ -246,7 +246,7 @@ impl<T> BorrowFrom<Arc<T>> for T { } } -#[experimental = "Deref is experimental."] +#[stable] impl<T> Deref for Arc<T> { type Target = T; @@ -290,7 +290,7 @@ impl<T: Send + Sync + Clone> Arc<T> { } #[unsafe_destructor] -#[experimental = "waiting on stability of Drop"] +#[stable] impl<T: Sync + Send> Drop for Arc<T> { /// Drops the `Arc<T>`. /// @@ -418,7 +418,7 @@ impl<T: Sync + Send> Clone for Weak<T> { } #[unsafe_destructor] -#[experimental = "Weak pointers may not belong in this module."] +#[stable] impl<T: Sync + Send> Drop for Weak<T> { /// Drops the `Weak<T>`. /// diff --git a/src/liballoc/boxed.rs b/src/liballoc/boxed.rs index 2c318181b09..6df8bb5f7aa 100644 --- a/src/liballoc/boxed.rs +++ b/src/liballoc/boxed.rs @@ -75,14 +75,14 @@ impl<T: Clone> Clone for Box<T> { } #[stable] -impl<Sized? T: PartialEq> PartialEq for Box<T> { +impl<T: ?Sized + PartialEq> PartialEq for Box<T> { #[inline] fn eq(&self, other: &Box<T>) -> bool { PartialEq::eq(&**self, &**other) } #[inline] fn ne(&self, other: &Box<T>) -> bool { PartialEq::ne(&**self, &**other) } } #[stable] -impl<Sized? T: PartialOrd> PartialOrd for Box<T> { +impl<T: ?Sized + PartialOrd> PartialOrd for Box<T> { #[inline] fn partial_cmp(&self, other: &Box<T>) -> Option<Ordering> { PartialOrd::partial_cmp(&**self, &**other) @@ -97,16 +97,16 @@ impl<Sized? T: PartialOrd> PartialOrd for Box<T> { fn gt(&self, other: &Box<T>) -> bool { PartialOrd::gt(&**self, &**other) } } #[stable] -impl<Sized? T: Ord> Ord for Box<T> { +impl<T: ?Sized + Ord> Ord for Box<T> { #[inline] fn cmp(&self, other: &Box<T>) -> Ordering { Ord::cmp(&**self, &**other) } #[stable]} -impl<Sized? T: Eq> Eq for Box<T> {} +impl<T: ?Sized + Eq> Eq for Box<T> {} -impl<S: hash::Writer, Sized? T: Hash<S>> Hash<S> for Box<T> { +impl<S: hash::Writer, T: ?Sized + Hash<S>> Hash<S> for Box<T> { #[inline] fn hash(&self, state: &mut S) { (**self).hash(state); @@ -143,7 +143,7 @@ impl BoxAny for Box<Any> { } } -impl<Sized? T: fmt::Show> fmt::Show for Box<T> { +impl<T: ?Sized + fmt::Show> fmt::Show for Box<T> { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { (**self).fmt(f) } @@ -155,13 +155,15 @@ impl fmt::Show for Box<Any> { } } -impl<Sized? T> Deref for Box<T> { +#[stable] +impl<T: ?Sized> Deref for Box<T> { type Target = T; fn deref(&self) -> &T { &**self } } -impl<Sized? T> DerefMut for Box<T> { +#[stable] +impl<T: ?Sized> DerefMut for Box<T> { fn deref_mut(&mut self) -> &mut T { &mut **self } } diff --git a/src/liballoc/lib.rs b/src/liballoc/lib.rs index d040f8ff863..001e02f9c0d 100644 --- a/src/liballoc/lib.rs +++ b/src/liballoc/lib.rs @@ -68,14 +68,33 @@ #![feature(lang_items, phase, unsafe_destructor, default_type_params, old_orphan_check)] #![feature(associated_types)] +#[cfg(stage0)] #[phase(plugin, link)] extern crate core; + +#[cfg(not(stage0))] +#[macro_use] +extern crate core; + extern crate libc; // Allow testing this library -#[cfg(test)] #[phase(plugin, link)] extern crate std; -#[cfg(test)] #[phase(plugin, link)] extern crate log; +#[cfg(all(test, stage0))] +#[phase(plugin, link)] +extern crate std; + +#[cfg(all(test, not(stage0)))] +#[macro_use] +extern crate std; + +#[cfg(all(test, stage0))] +#[phase(plugin, link)] +extern crate log; + +#[cfg(all(test, not(stage0)))] +#[macro_use] +extern crate log; // Heaps provided for low-level allocation strategies diff --git a/src/liballoc/rc.rs b/src/liballoc/rc.rs index c4b455aff5c..175bba4e71d 100644 --- a/src/liballoc/rc.rs +++ b/src/liballoc/rc.rs @@ -354,7 +354,7 @@ impl<T> BorrowFrom<Rc<T>> for T { } } -#[experimental = "Deref is experimental."] +#[stable] impl<T> Deref for Rc<T> { type Target = T; @@ -365,7 +365,7 @@ impl<T> Deref for Rc<T> { } #[unsafe_destructor] -#[experimental = "Drop is experimental."] +#[stable] impl<T> Drop for Rc<T> { /// Drops the `Rc<T>`. /// @@ -656,7 +656,7 @@ impl<T> Weak<T> { } #[unsafe_destructor] -#[experimental = "Weak pointers may not belong in this module."] +#[stable] impl<T> Drop for Weak<T> { /// Drops the `Weak<T>`. /// |
