From 06a7dcd35588c0dd6eaa0a523b30e4140ff79868 Mon Sep 17 00:00:00 2001 From: Oliver Middleton Date: Wed, 28 Sep 2016 11:28:42 +0100 Subject: std: Correct stability attributes for some implementations These are displayed by rustdoc so should be correct. --- src/libcore/array.rs | 2 ++ src/libcore/iter/mod.rs | 6 +++--- src/libcore/iter/range.rs | 6 ++++-- src/libcore/num/mod.rs | 6 +++--- src/libcore/num/wrapping.rs | 8 ++++---- src/libcore/ptr.rs | 2 +- 6 files changed, 17 insertions(+), 13 deletions(-) (limited to 'src/libcore') diff --git a/src/libcore/array.rs b/src/libcore/array.rs index 9866a39619a..37bd57034a7 100644 --- a/src/libcore/array.rs +++ b/src/libcore/array.rs @@ -93,6 +93,7 @@ macro_rules! __impl_slice_eq2 { macro_rules! array_impls { ($($N:expr)+) => { $( + #[stable(feature = "rust1", since = "1.0.0")] impl AsRef<[T]> for [T; $N] { #[inline] fn as_ref(&self) -> &[T] { @@ -100,6 +101,7 @@ macro_rules! array_impls { } } + #[stable(feature = "rust1", since = "1.0.0")] impl AsMut<[T]> for [T; $N] { #[inline] fn as_mut(&mut self) -> &mut [T] { diff --git a/src/libcore/iter/mod.rs b/src/libcore/iter/mod.rs index dd57fd1b519..035418570a0 100644 --- a/src/libcore/iter/mod.rs +++ b/src/libcore/iter/mod.rs @@ -386,7 +386,7 @@ pub struct Cloned { it: I, } -#[stable(feature = "rust1", since = "1.0.0")] +#[stable(feature = "iter_cloned", since = "1.1.0")] impl<'a, I, T: 'a> Iterator for Cloned where I: Iterator, T: Clone { @@ -401,7 +401,7 @@ impl<'a, I, T: 'a> Iterator for Cloned } } -#[stable(feature = "rust1", since = "1.0.0")] +#[stable(feature = "iter_cloned", since = "1.1.0")] impl<'a, I, T: 'a> DoubleEndedIterator for Cloned where I: DoubleEndedIterator, T: Clone { @@ -410,7 +410,7 @@ impl<'a, I, T: 'a> DoubleEndedIterator for Cloned } } -#[stable(feature = "rust1", since = "1.0.0")] +#[stable(feature = "iter_cloned", since = "1.1.0")] impl<'a, I, T: 'a> ExactSizeIterator for Cloned where I: ExactSizeIterator, T: Clone {} diff --git a/src/libcore/iter/range.rs b/src/libcore/iter/range.rs index 38afcb6a65e..eaa3d50c88a 100644 --- a/src/libcore/iter/range.rs +++ b/src/libcore/iter/range.rs @@ -328,7 +328,8 @@ impl ops::RangeInclusive { } } -#[stable(feature = "rust1", since = "1.0.0")] +#[unstable(feature = "step_by", reason = "recent addition", + issue = "27741")] impl Iterator for StepBy> where A: Clone, for<'a> &'a A: Add<&'a A, Output = A> @@ -352,7 +353,8 @@ impl Iterator for StepBy> where impl FusedIterator for StepBy> where A: Clone, for<'a> &'a A: Add<&'a A, Output = A> {} -#[stable(feature = "rust1", since = "1.0.0")] +#[unstable(feature = "step_by", reason = "recent addition", + issue = "27741")] impl Iterator for StepBy> { type Item = A; diff --git a/src/libcore/num/mod.rs b/src/libcore/num/mod.rs index 7b797631dfd..d394a7db5ed 100644 --- a/src/libcore/num/mod.rs +++ b/src/libcore/num/mod.rs @@ -2576,7 +2576,7 @@ impl fmt::Display for TryFromIntError { macro_rules! same_sign_from_int_impl { ($storage:ty, $target:ty, $($source:ty),*) => {$( - #[stable(feature = "rust1", since = "1.0.0")] + #[unstable(feature = "try_from", issue = "33417")] impl TryFrom<$source> for $target { type Err = TryFromIntError; @@ -2606,7 +2606,7 @@ same_sign_from_int_impl!(i64, isize, i8, i16, i32, i64, isize); macro_rules! cross_sign_from_int_impl { ($unsigned:ty, $($signed:ty),*) => {$( - #[stable(feature = "rust1", since = "1.0.0")] + #[unstable(feature = "try_from", issue = "33417")] impl TryFrom<$unsigned> for $signed { type Err = TryFromIntError; @@ -2620,7 +2620,7 @@ macro_rules! cross_sign_from_int_impl { } } - #[stable(feature = "rust1", since = "1.0.0")] + #[unstable(feature = "try_from", issue = "33417")] impl TryFrom<$signed> for $unsigned { type Err = TryFromIntError; diff --git a/src/libcore/num/wrapping.rs b/src/libcore/num/wrapping.rs index 4857817e84e..2c69880dfa3 100644 --- a/src/libcore/num/wrapping.rs +++ b/src/libcore/num/wrapping.rs @@ -28,7 +28,7 @@ macro_rules! sh_impl_signed { } } - #[stable(feature = "wrapping_impls", since = "1.7.0")] + #[stable(feature = "op_assign_traits", since = "1.8.0")] impl ShlAssign<$f> for Wrapping<$t> { #[inline(always)] fn shl_assign(&mut self, other: $f) { @@ -50,7 +50,7 @@ macro_rules! sh_impl_signed { } } - #[stable(feature = "wrapping_impls", since = "1.7.0")] + #[stable(feature = "op_assign_traits", since = "1.8.0")] impl ShrAssign<$f> for Wrapping<$t> { #[inline(always)] fn shr_assign(&mut self, other: $f) { @@ -72,7 +72,7 @@ macro_rules! sh_impl_unsigned { } } - #[stable(feature = "wrapping_impls", since = "1.7.0")] + #[stable(feature = "op_assign_traits", since = "1.8.0")] impl ShlAssign<$f> for Wrapping<$t> { #[inline(always)] fn shl_assign(&mut self, other: $f) { @@ -90,7 +90,7 @@ macro_rules! sh_impl_unsigned { } } - #[stable(feature = "wrapping_impls", since = "1.7.0")] + #[stable(feature = "op_assign_traits", since = "1.8.0")] impl ShrAssign<$f> for Wrapping<$t> { #[inline(always)] fn shr_assign(&mut self, other: $f) { diff --git a/src/libcore/ptr.rs b/src/libcore/ptr.rs index 69682652a6a..f0510422a07 100644 --- a/src/libcore/ptr.rs +++ b/src/libcore/ptr.rs @@ -761,7 +761,7 @@ impl Deref for Unique { } } -#[stable(feature = "rust1", since = "1.0.0")] +#[unstable(feature = "unique", issue = "27730")] impl fmt::Pointer for Unique { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fmt::Pointer::fmt(&*self.pointer, f) -- cgit 1.4.1-3-g733a5