diff options
| author | bors <bors@rust-lang.org> | 2015-11-18 19:49:33 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-11-18 19:49:33 +0000 |
| commit | 22e31f10c22112b486f4999f90e4ba9c7e23b9b6 (patch) | |
| tree | 28e9ca0bf181ccff4f1e5fa6e929c1c714df9ce7 /src/liballoc | |
| parent | 3c68f646e957065fe5fabd4af850abaa8c4ee0af (diff) | |
| parent | 64b90f81c3ec2cf5564ed8456d836516491b9d01 (diff) | |
| download | rust-22e31f10c22112b486f4999f90e4ba9c7e23b9b6.tar.gz rust-22e31f10c22112b486f4999f90e4ba9c7e23b9b6.zip | |
Auto merge of #29083 - petrochenkov:stability3, r=alexcrichton
What this patch does: - Stability annotations are now based on "exported items" supplied by rustc_privacy and not "public items". Exported items are as accessible for external crates as directly public items and should be annotated with stability attributes. - Trait impls require annotations now. - Reexports require annotations now. - Crates themselves didn't require annotations, now they do. - Exported macros are annotated now, but these annotations are not used yet. - Some useless annotations are detected and result in errors - Finally, some small bugs are fixed - deprecation propagates from stable deprecated parents, items in blocks are traversed correctly (fixes https://github.com/rust-lang/rust/issues/29034) + some code cleanup.
Diffstat (limited to 'src/liballoc')
| -rw-r--r-- | src/liballoc/arc.rs | 7 | ||||
| -rw-r--r-- | src/liballoc/boxed.rs | 22 | ||||
| -rw-r--r-- | src/liballoc/rc.rs | 7 |
3 files changed, 36 insertions, 0 deletions
diff --git a/src/liballoc/arc.rs b/src/liballoc/arc.rs index 8205e13205f..7863f101811 100644 --- a/src/liballoc/arc.rs +++ b/src/liballoc/arc.rs @@ -130,10 +130,13 @@ pub struct Arc<T: ?Sized> { _ptr: Shared<ArcInner<T>>, } +#[stable(feature = "rust1", since = "1.0.0")] unsafe impl<T: ?Sized + Sync + Send> Send for Arc<T> { } +#[stable(feature = "rust1", since = "1.0.0")] unsafe impl<T: ?Sized + Sync + Send> Sync for Arc<T> { } #[cfg(not(stage0))] // remove cfg after new snapshot +#[unstable(feature = "coerce_unsized", issue = "27732")] impl<T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<Arc<U>> for Arc<T> {} /// A weak pointer to an `Arc`. @@ -148,10 +151,13 @@ pub struct Weak<T: ?Sized> { _ptr: Shared<ArcInner<T>>, } +#[stable(feature = "rust1", since = "1.0.0")] unsafe impl<T: ?Sized + Sync + Send> Send for Weak<T> { } +#[stable(feature = "rust1", since = "1.0.0")] unsafe impl<T: ?Sized + Sync + Send> Sync for Weak<T> { } #[cfg(not(stage0))] // remove cfg after new snapshot +#[unstable(feature = "coerce_unsized", issue = "27732")] impl<T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<Weak<U>> for Weak<T> {} #[stable(feature = "rust1", since = "1.0.0")] @@ -1157,6 +1163,7 @@ mod tests { } } +#[stable(feature = "rust1", since = "1.0.0")] impl<T: ?Sized> borrow::Borrow<T> for Arc<T> { fn borrow(&self) -> &T { &**self diff --git a/src/liballoc/boxed.rs b/src/liballoc/boxed.rs index b5c6cdff119..65c66ebe768 100644 --- a/src/liballoc/boxed.rs +++ b/src/liballoc/boxed.rs @@ -136,6 +136,9 @@ pub struct IntermediateBox<T: ?Sized> { marker: marker::PhantomData<*mut T>, } +#[unstable(feature = "placement_in", + reason = "placement box design is still being worked out.", + issue = "27779")] impl<T> Place<T> for IntermediateBox<T> { fn pointer(&mut self) -> *mut T { self.ptr as *mut T @@ -170,12 +173,18 @@ fn make_place<T>() -> IntermediateBox<T> { } } +#[unstable(feature = "placement_in", + reason = "placement box design is still being worked out.", + issue = "27779")] impl<T> BoxPlace<T> for IntermediateBox<T> { fn make_place() -> IntermediateBox<T> { make_place() } } +#[unstable(feature = "placement_in", + reason = "placement box design is still being worked out.", + issue = "27779")] impl<T> InPlace<T> for IntermediateBox<T> { type Owner = Box<T>; unsafe fn finalize(self) -> Box<T> { @@ -183,6 +192,7 @@ impl<T> InPlace<T> for IntermediateBox<T> { } } +#[unstable(feature = "placement_new_protocol", issue = "27779")] impl<T> Boxed for Box<T> { type Data = T; type Place = IntermediateBox<T>; @@ -191,6 +201,9 @@ impl<T> Boxed for Box<T> { } } +#[unstable(feature = "placement_in", + reason = "placement box design is still being worked out.", + issue = "27779")] impl<T> Placer<T> for ExchangeHeapSingleton { type Place = IntermediateBox<T>; @@ -199,6 +212,9 @@ impl<T> Placer<T> for ExchangeHeapSingleton { } } +#[unstable(feature = "placement_in", + reason = "placement box design is still being worked out.", + issue = "27779")] impl<T: ?Sized> Drop for IntermediateBox<T> { fn drop(&mut self) { if self.size > 0 { @@ -518,6 +534,7 @@ pub trait FnBox<A> { fn call_box(self: Box<Self>, args: A) -> Self::Output; } +#[unstable(feature = "fnbox", reason = "Newly introduced", issue = "0")] impl<A,F> FnBox<A> for F where F: FnOnce<A> { @@ -528,6 +545,7 @@ impl<A,F> FnBox<A> for F } } +#[unstable(feature = "fnbox", reason = "Newly introduced", issue = "0")] impl<'a,A,R> FnOnce<A> for Box<FnBox<A,Output=R>+'a> { type Output = R; @@ -536,6 +554,7 @@ impl<'a,A,R> FnOnce<A> for Box<FnBox<A,Output=R>+'a> { } } +#[unstable(feature = "fnbox", reason = "Newly introduced", issue = "0")] impl<'a,A,R> FnOnce<A> for Box<FnBox<A,Output=R>+Send+'a> { type Output = R; @@ -544,6 +563,7 @@ impl<'a,A,R> FnOnce<A> for Box<FnBox<A,Output=R>+Send+'a> { } } +#[unstable(feature = "coerce_unsized", issue = "27732")] impl<T: ?Sized+Unsize<U>, U: ?Sized> CoerceUnsized<Box<U>> for Box<T> {} #[stable(feature = "box_slice_clone", since = "1.3.0")] @@ -597,12 +617,14 @@ impl<T: Clone> Clone for Box<[T]> { } } +#[stable(feature = "rust1", since = "1.0.0")] impl<T: ?Sized> borrow::Borrow<T> for Box<T> { fn borrow(&self) -> &T { &**self } } +#[stable(feature = "rust1", since = "1.0.0")] impl<T: ?Sized> borrow::BorrowMut<T> for Box<T> { fn borrow_mut(&mut self) -> &mut T { &mut **self diff --git a/src/liballoc/rc.rs b/src/liballoc/rc.rs index 88db3cfe4b6..7abdc447ee5 100644 --- a/src/liballoc/rc.rs +++ b/src/liballoc/rc.rs @@ -191,10 +191,13 @@ pub struct Rc<T: ?Sized> { _ptr: Shared<RcBox<T>>, } +#[stable(feature = "rust1", since = "1.0.0")] impl<T: ?Sized> !marker::Send for Rc<T> {} +#[stable(feature = "rust1", since = "1.0.0")] impl<T: ?Sized> !marker::Sync for Rc<T> {} #[cfg(not(stage0))] // remove cfg after new snapshot +#[unstable(feature = "coerce_unsized", issue = "27732")] impl<T: ?Sized+Unsize<U>, U: ?Sized> CoerceUnsized<Rc<U>> for Rc<T> {} impl<T> Rc<T> { @@ -723,10 +726,13 @@ pub struct Weak<T: ?Sized> { _ptr: Shared<RcBox<T>>, } +#[stable(feature = "rust1", since = "1.0.0")] impl<T: ?Sized> !marker::Send for Weak<T> {} +#[stable(feature = "rust1", since = "1.0.0")] impl<T: ?Sized> !marker::Sync for Weak<T> {} #[cfg(not(stage0))] // remove cfg after new snapshot +#[unstable(feature = "coerce_unsized", issue = "27732")] impl<T: ?Sized+Unsize<U>, U: ?Sized> CoerceUnsized<Weak<U>> for Weak<T> {} impl<T: ?Sized> Weak<T> { @@ -1126,6 +1132,7 @@ mod tests { } } +#[stable(feature = "rust1", since = "1.0.0")] impl<T: ?Sized> borrow::Borrow<T> for Rc<T> { fn borrow(&self) -> &T { &**self |
