Correct a few stability attributes

This commit is contained in:
Oliver Middleton
2017-12-27 14:11:05 +00:00
parent 0efdfa1d62
commit a8d107be25
8 changed files with 39 additions and 24 deletions

View File

@@ -1024,7 +1024,7 @@ impl<T: ::fmt::Debug> ::fmt::Debug for ManuallyDrop<T> {
} }
} }
#[stable(feature = "manually_drop", since = "1.20.0")] #[stable(feature = "manually_drop_impls", since = "1.22.0")]
impl<T: Clone> Clone for ManuallyDrop<T> { impl<T: Clone> Clone for ManuallyDrop<T> {
fn clone(&self) -> Self { fn clone(&self) -> Self {
ManuallyDrop::new(self.deref().clone()) ManuallyDrop::new(self.deref().clone())
@@ -1035,14 +1035,14 @@ impl<T: Clone> Clone for ManuallyDrop<T> {
} }
} }
#[stable(feature = "manually_drop", since = "1.20.0")] #[stable(feature = "manually_drop_impls", since = "1.22.0")]
impl<T: Default> Default for ManuallyDrop<T> { impl<T: Default> Default for ManuallyDrop<T> {
fn default() -> Self { fn default() -> Self {
ManuallyDrop::new(Default::default()) ManuallyDrop::new(Default::default())
} }
} }
#[stable(feature = "manually_drop", since = "1.20.0")] #[stable(feature = "manually_drop_impls", since = "1.22.0")]
impl<T: PartialEq> PartialEq for ManuallyDrop<T> { impl<T: PartialEq> PartialEq for ManuallyDrop<T> {
fn eq(&self, other: &Self) -> bool { fn eq(&self, other: &Self) -> bool {
self.deref().eq(other) self.deref().eq(other)
@@ -1053,10 +1053,10 @@ impl<T: PartialEq> PartialEq for ManuallyDrop<T> {
} }
} }
#[stable(feature = "manually_drop", since = "1.20.0")] #[stable(feature = "manually_drop_impls", since = "1.22.0")]
impl<T: Eq> Eq for ManuallyDrop<T> {} impl<T: Eq> Eq for ManuallyDrop<T> {}
#[stable(feature = "manually_drop", since = "1.20.0")] #[stable(feature = "manually_drop_impls", since = "1.22.0")]
impl<T: PartialOrd> PartialOrd for ManuallyDrop<T> { impl<T: PartialOrd> PartialOrd for ManuallyDrop<T> {
fn partial_cmp(&self, other: &Self) -> Option<::cmp::Ordering> { fn partial_cmp(&self, other: &Self) -> Option<::cmp::Ordering> {
self.deref().partial_cmp(other) self.deref().partial_cmp(other)
@@ -1079,14 +1079,14 @@ impl<T: PartialOrd> PartialOrd for ManuallyDrop<T> {
} }
} }
#[stable(feature = "manually_drop", since = "1.20.0")] #[stable(feature = "manually_drop_impls", since = "1.22.0")]
impl<T: Ord> Ord for ManuallyDrop<T> { impl<T: Ord> Ord for ManuallyDrop<T> {
fn cmp(&self, other: &Self) -> ::cmp::Ordering { fn cmp(&self, other: &Self) -> ::cmp::Ordering {
self.deref().cmp(other) self.deref().cmp(other)
} }
} }
#[stable(feature = "manually_drop", since = "1.20.0")] #[stable(feature = "manually_drop_impls", since = "1.22.0")]
impl<T: ::hash::Hash> ::hash::Hash for ManuallyDrop<T> { impl<T: ::hash::Hash> ::hash::Hash for ManuallyDrop<T> {
fn hash<H: ::hash::Hasher>(&self, state: &mut H) { fn hash<H: ::hash::Hasher>(&self, state: &mut H) {
self.deref().hash(state); self.deref().hash(state);

View File

@@ -1997,7 +1997,9 @@ mod traits {
} }
} }
#[stable(feature = "str_checked_slicing", since = "1.20.0")] #[unstable(feature = "inclusive_range",
reason = "recently added, follows RFC",
issue = "28237")]
impl SliceIndex<str> for ops::RangeInclusive<usize> { impl SliceIndex<str> for ops::RangeInclusive<usize> {
type Output = str; type Output = str;
#[inline] #[inline]
@@ -2040,7 +2042,9 @@ mod traits {
#[stable(feature = "str_checked_slicing", since = "1.20.0")] #[unstable(feature = "inclusive_range",
reason = "recently added, follows RFC",
issue = "28237")]
impl SliceIndex<str> for ops::RangeToInclusive<usize> { impl SliceIndex<str> for ops::RangeToInclusive<usize> {
type Output = str; type Output = str;
#[inline] #[inline]

View File

@@ -944,6 +944,7 @@ macro_rules! atomic_int {
$stable_cxchg:meta, $stable_cxchg:meta,
$stable_debug:meta, $stable_debug:meta,
$stable_access:meta, $stable_access:meta,
$stable_from:meta,
$s_int_type:expr, $int_ref:expr, $s_int_type:expr, $int_ref:expr,
$int_type:ident $atomic_type:ident $atomic_init:ident) => { $int_type:ident $atomic_type:ident $atomic_init:ident) => {
/// An integer type which can be safely shared between threads. /// An integer type which can be safely shared between threads.
@@ -978,7 +979,7 @@ macro_rules! atomic_int {
} }
} }
#[stable(feature = "atomic_from", since = "1.23.0")] #[$stable_from]
impl From<$int_type> for $atomic_type { impl From<$int_type> for $atomic_type {
#[inline] #[inline]
fn from(v: $int_type) -> Self { Self::new(v) } fn from(v: $int_type) -> Self { Self::new(v) }
@@ -1375,6 +1376,7 @@ atomic_int! {
unstable(feature = "integer_atomics", issue = "32976"), unstable(feature = "integer_atomics", issue = "32976"),
unstable(feature = "integer_atomics", issue = "32976"), unstable(feature = "integer_atomics", issue = "32976"),
unstable(feature = "integer_atomics", issue = "32976"), unstable(feature = "integer_atomics", issue = "32976"),
unstable(feature = "integer_atomics", issue = "32976"),
"i8", "../../../std/primitive.i8.html", "i8", "../../../std/primitive.i8.html",
i8 AtomicI8 ATOMIC_I8_INIT i8 AtomicI8 ATOMIC_I8_INIT
} }
@@ -1384,6 +1386,7 @@ atomic_int! {
unstable(feature = "integer_atomics", issue = "32976"), unstable(feature = "integer_atomics", issue = "32976"),
unstable(feature = "integer_atomics", issue = "32976"), unstable(feature = "integer_atomics", issue = "32976"),
unstable(feature = "integer_atomics", issue = "32976"), unstable(feature = "integer_atomics", issue = "32976"),
unstable(feature = "integer_atomics", issue = "32976"),
"u8", "../../../std/primitive.u8.html", "u8", "../../../std/primitive.u8.html",
u8 AtomicU8 ATOMIC_U8_INIT u8 AtomicU8 ATOMIC_U8_INIT
} }
@@ -1393,6 +1396,7 @@ atomic_int! {
unstable(feature = "integer_atomics", issue = "32976"), unstable(feature = "integer_atomics", issue = "32976"),
unstable(feature = "integer_atomics", issue = "32976"), unstable(feature = "integer_atomics", issue = "32976"),
unstable(feature = "integer_atomics", issue = "32976"), unstable(feature = "integer_atomics", issue = "32976"),
unstable(feature = "integer_atomics", issue = "32976"),
"i16", "../../../std/primitive.i16.html", "i16", "../../../std/primitive.i16.html",
i16 AtomicI16 ATOMIC_I16_INIT i16 AtomicI16 ATOMIC_I16_INIT
} }
@@ -1402,6 +1406,7 @@ atomic_int! {
unstable(feature = "integer_atomics", issue = "32976"), unstable(feature = "integer_atomics", issue = "32976"),
unstable(feature = "integer_atomics", issue = "32976"), unstable(feature = "integer_atomics", issue = "32976"),
unstable(feature = "integer_atomics", issue = "32976"), unstable(feature = "integer_atomics", issue = "32976"),
unstable(feature = "integer_atomics", issue = "32976"),
"u16", "../../../std/primitive.u16.html", "u16", "../../../std/primitive.u16.html",
u16 AtomicU16 ATOMIC_U16_INIT u16 AtomicU16 ATOMIC_U16_INIT
} }
@@ -1411,6 +1416,7 @@ atomic_int! {
unstable(feature = "integer_atomics", issue = "32976"), unstable(feature = "integer_atomics", issue = "32976"),
unstable(feature = "integer_atomics", issue = "32976"), unstable(feature = "integer_atomics", issue = "32976"),
unstable(feature = "integer_atomics", issue = "32976"), unstable(feature = "integer_atomics", issue = "32976"),
unstable(feature = "integer_atomics", issue = "32976"),
"i32", "../../../std/primitive.i32.html", "i32", "../../../std/primitive.i32.html",
i32 AtomicI32 ATOMIC_I32_INIT i32 AtomicI32 ATOMIC_I32_INIT
} }
@@ -1420,6 +1426,7 @@ atomic_int! {
unstable(feature = "integer_atomics", issue = "32976"), unstable(feature = "integer_atomics", issue = "32976"),
unstable(feature = "integer_atomics", issue = "32976"), unstable(feature = "integer_atomics", issue = "32976"),
unstable(feature = "integer_atomics", issue = "32976"), unstable(feature = "integer_atomics", issue = "32976"),
unstable(feature = "integer_atomics", issue = "32976"),
"u32", "../../../std/primitive.u32.html", "u32", "../../../std/primitive.u32.html",
u32 AtomicU32 ATOMIC_U32_INIT u32 AtomicU32 ATOMIC_U32_INIT
} }
@@ -1429,6 +1436,7 @@ atomic_int! {
unstable(feature = "integer_atomics", issue = "32976"), unstable(feature = "integer_atomics", issue = "32976"),
unstable(feature = "integer_atomics", issue = "32976"), unstable(feature = "integer_atomics", issue = "32976"),
unstable(feature = "integer_atomics", issue = "32976"), unstable(feature = "integer_atomics", issue = "32976"),
unstable(feature = "integer_atomics", issue = "32976"),
"i64", "../../../std/primitive.i64.html", "i64", "../../../std/primitive.i64.html",
i64 AtomicI64 ATOMIC_I64_INIT i64 AtomicI64 ATOMIC_I64_INIT
} }
@@ -1438,6 +1446,7 @@ atomic_int! {
unstable(feature = "integer_atomics", issue = "32976"), unstable(feature = "integer_atomics", issue = "32976"),
unstable(feature = "integer_atomics", issue = "32976"), unstable(feature = "integer_atomics", issue = "32976"),
unstable(feature = "integer_atomics", issue = "32976"), unstable(feature = "integer_atomics", issue = "32976"),
unstable(feature = "integer_atomics", issue = "32976"),
"u64", "../../../std/primitive.u64.html", "u64", "../../../std/primitive.u64.html",
u64 AtomicU64 ATOMIC_U64_INIT u64 AtomicU64 ATOMIC_U64_INIT
} }
@@ -1447,6 +1456,7 @@ atomic_int!{
stable(feature = "extended_compare_and_swap", since = "1.10.0"), stable(feature = "extended_compare_and_swap", since = "1.10.0"),
stable(feature = "atomic_debug", since = "1.3.0"), stable(feature = "atomic_debug", since = "1.3.0"),
stable(feature = "atomic_access", since = "1.15.0"), stable(feature = "atomic_access", since = "1.15.0"),
stable(feature = "atomic_from", since = "1.23.0"),
"isize", "../../../std/primitive.isize.html", "isize", "../../../std/primitive.isize.html",
isize AtomicIsize ATOMIC_ISIZE_INIT isize AtomicIsize ATOMIC_ISIZE_INIT
} }
@@ -1456,6 +1466,7 @@ atomic_int!{
stable(feature = "extended_compare_and_swap", since = "1.10.0"), stable(feature = "extended_compare_and_swap", since = "1.10.0"),
stable(feature = "atomic_debug", since = "1.3.0"), stable(feature = "atomic_debug", since = "1.3.0"),
stable(feature = "atomic_access", since = "1.15.0"), stable(feature = "atomic_access", since = "1.15.0"),
stable(feature = "atomic_from", since = "1.23.0"),
"usize", "../../../std/primitive.usize.html", "usize", "../../../std/primitive.usize.html",
usize AtomicUsize ATOMIC_USIZE_INIT usize AtomicUsize ATOMIC_USIZE_INIT
} }

View File

@@ -706,7 +706,7 @@ impl From<CString> for Box<CStr> {
} }
} }
#[stable(feature = "shared_from_slice2", since = "1.23.0")] #[stable(feature = "shared_from_slice2", since = "1.24.0")]
impl From<CString> for Arc<CStr> { impl From<CString> for Arc<CStr> {
#[inline] #[inline]
fn from(s: CString) -> Arc<CStr> { fn from(s: CString) -> Arc<CStr> {
@@ -715,7 +715,7 @@ impl From<CString> for Arc<CStr> {
} }
} }
#[stable(feature = "shared_from_slice2", since = "1.23.0")] #[stable(feature = "shared_from_slice2", since = "1.24.0")]
impl<'a> From<&'a CStr> for Arc<CStr> { impl<'a> From<&'a CStr> for Arc<CStr> {
#[inline] #[inline]
fn from(s: &CStr) -> Arc<CStr> { fn from(s: &CStr) -> Arc<CStr> {
@@ -724,7 +724,7 @@ impl<'a> From<&'a CStr> for Arc<CStr> {
} }
} }
#[stable(feature = "shared_from_slice2", since = "1.23.0")] #[stable(feature = "shared_from_slice2", since = "1.24.0")]
impl From<CString> for Rc<CStr> { impl From<CString> for Rc<CStr> {
#[inline] #[inline]
fn from(s: CString) -> Rc<CStr> { fn from(s: CString) -> Rc<CStr> {
@@ -733,7 +733,7 @@ impl From<CString> for Rc<CStr> {
} }
} }
#[stable(feature = "shared_from_slice2", since = "1.23.0")] #[stable(feature = "shared_from_slice2", since = "1.24.0")]
impl<'a> From<&'a CStr> for Rc<CStr> { impl<'a> From<&'a CStr> for Rc<CStr> {
#[inline] #[inline]
fn from(s: &CStr) -> Rc<CStr> { fn from(s: &CStr) -> Rc<CStr> {

View File

@@ -594,7 +594,7 @@ impl From<OsString> for Box<OsStr> {
} }
} }
#[stable(feature = "shared_from_slice2", since = "1.23.0")] #[stable(feature = "shared_from_slice2", since = "1.24.0")]
impl From<OsString> for Arc<OsStr> { impl From<OsString> for Arc<OsStr> {
#[inline] #[inline]
fn from(s: OsString) -> Arc<OsStr> { fn from(s: OsString) -> Arc<OsStr> {
@@ -603,7 +603,7 @@ impl From<OsString> for Arc<OsStr> {
} }
} }
#[stable(feature = "shared_from_slice2", since = "1.23.0")] #[stable(feature = "shared_from_slice2", since = "1.24.0")]
impl<'a> From<&'a OsStr> for Arc<OsStr> { impl<'a> From<&'a OsStr> for Arc<OsStr> {
#[inline] #[inline]
fn from(s: &OsStr) -> Arc<OsStr> { fn from(s: &OsStr) -> Arc<OsStr> {
@@ -612,7 +612,7 @@ impl<'a> From<&'a OsStr> for Arc<OsStr> {
} }
} }
#[stable(feature = "shared_from_slice2", since = "1.23.0")] #[stable(feature = "shared_from_slice2", since = "1.24.0")]
impl From<OsString> for Rc<OsStr> { impl From<OsString> for Rc<OsStr> {
#[inline] #[inline]
fn from(s: OsString) -> Rc<OsStr> { fn from(s: OsString) -> Rc<OsStr> {
@@ -621,7 +621,7 @@ impl From<OsString> for Rc<OsStr> {
} }
} }
#[stable(feature = "shared_from_slice2", since = "1.23.0")] #[stable(feature = "shared_from_slice2", since = "1.24.0")]
impl<'a> From<&'a OsStr> for Rc<OsStr> { impl<'a> From<&'a OsStr> for Rc<OsStr> {
#[inline] #[inline]
fn from(s: &OsStr) -> Rc<OsStr> { fn from(s: &OsStr) -> Rc<OsStr> {

View File

@@ -1454,7 +1454,7 @@ impl<'a> From<PathBuf> for Cow<'a, Path> {
} }
} }
#[stable(feature = "shared_from_slice2", since = "1.23.0")] #[stable(feature = "shared_from_slice2", since = "1.24.0")]
impl From<PathBuf> for Arc<Path> { impl From<PathBuf> for Arc<Path> {
#[inline] #[inline]
fn from(s: PathBuf) -> Arc<Path> { fn from(s: PathBuf) -> Arc<Path> {
@@ -1463,7 +1463,7 @@ impl From<PathBuf> for Arc<Path> {
} }
} }
#[stable(feature = "shared_from_slice2", since = "1.23.0")] #[stable(feature = "shared_from_slice2", since = "1.24.0")]
impl<'a> From<&'a Path> for Arc<Path> { impl<'a> From<&'a Path> for Arc<Path> {
#[inline] #[inline]
fn from(s: &Path) -> Arc<Path> { fn from(s: &Path) -> Arc<Path> {
@@ -1472,7 +1472,7 @@ impl<'a> From<&'a Path> for Arc<Path> {
} }
} }
#[stable(feature = "shared_from_slice2", since = "1.23.0")] #[stable(feature = "shared_from_slice2", since = "1.24.0")]
impl From<PathBuf> for Rc<Path> { impl From<PathBuf> for Rc<Path> {
#[inline] #[inline]
fn from(s: PathBuf) -> Rc<Path> { fn from(s: PathBuf) -> Rc<Path> {
@@ -1481,7 +1481,7 @@ impl From<PathBuf> for Rc<Path> {
} }
} }
#[stable(feature = "shared_from_slice2", since = "1.23.0")] #[stable(feature = "shared_from_slice2", since = "1.24.0")]
impl<'a> From<&'a Path> for Rc<Path> { impl<'a> From<&'a Path> for Rc<Path> {
#[inline] #[inline]
fn from(s: &Path) -> Rc<Path> { fn from(s: &Path) -> Rc<Path> {

View File

@@ -382,7 +382,7 @@ unsafe impl<#[may_dangle] T: ?Sized> Drop for Mutex<T> {
} }
} }
#[stable(feature = "mutex_from", since = "1.22.0")] #[stable(feature = "mutex_from", since = "1.24.0")]
impl<T> From<T> for Mutex<T> { impl<T> From<T> for Mutex<T> {
/// Creates a new mutex in an unlocked state ready for use. /// Creates a new mutex in an unlocked state ready for use.
/// This is equivalent to [`Mutex::new`]. /// This is equivalent to [`Mutex::new`].

View File

@@ -457,7 +457,7 @@ impl<T: Default> Default for RwLock<T> {
} }
} }
#[stable(feature = "rw_lock_from", since = "1.22.0")] #[stable(feature = "rw_lock_from", since = "1.24.0")]
impl<T> From<T> for RwLock<T> { impl<T> From<T> for RwLock<T> {
/// Creates a new instance of an `RwLock<T>` which is unlocked. /// Creates a new instance of an `RwLock<T>` which is unlocked.
/// This is equivalent to [`RwLock::new`]. /// This is equivalent to [`RwLock::new`].