From: Oliver Middleton Date: Wed, 27 Dec 2017 14:11:05 +0000 (+0000) Subject: Correct a few stability attributes X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=a8d107be258514261a9366a8a384e370eb0a9628;p=rust.git Correct a few stability attributes --- diff --git a/src/libcore/mem.rs b/src/libcore/mem.rs index 5b1a9399c39..93f6a0214d7 100644 --- a/src/libcore/mem.rs +++ b/src/libcore/mem.rs @@ -1024,7 +1024,7 @@ fn fmt(&self, fmt: &mut ::fmt::Formatter) -> ::fmt::Result { } } -#[stable(feature = "manually_drop", since = "1.20.0")] +#[stable(feature = "manually_drop_impls", since = "1.22.0")] impl Clone for ManuallyDrop { fn clone(&self) -> Self { ManuallyDrop::new(self.deref().clone()) @@ -1035,14 +1035,14 @@ fn clone_from(&mut self, source: &Self) { } } -#[stable(feature = "manually_drop", since = "1.20.0")] +#[stable(feature = "manually_drop_impls", since = "1.22.0")] impl Default for ManuallyDrop { fn default() -> Self { ManuallyDrop::new(Default::default()) } } -#[stable(feature = "manually_drop", since = "1.20.0")] +#[stable(feature = "manually_drop_impls", since = "1.22.0")] impl PartialEq for ManuallyDrop { fn eq(&self, other: &Self) -> bool { self.deref().eq(other) @@ -1053,10 +1053,10 @@ fn ne(&self, other: &Self) -> bool { } } -#[stable(feature = "manually_drop", since = "1.20.0")] +#[stable(feature = "manually_drop_impls", since = "1.22.0")] impl Eq for ManuallyDrop {} -#[stable(feature = "manually_drop", since = "1.20.0")] +#[stable(feature = "manually_drop_impls", since = "1.22.0")] impl PartialOrd for ManuallyDrop { fn partial_cmp(&self, other: &Self) -> Option<::cmp::Ordering> { self.deref().partial_cmp(other) @@ -1079,14 +1079,14 @@ fn ge(&self, other: &Self) -> bool { } } -#[stable(feature = "manually_drop", since = "1.20.0")] +#[stable(feature = "manually_drop_impls", since = "1.22.0")] impl Ord for ManuallyDrop { fn cmp(&self, other: &Self) -> ::cmp::Ordering { self.deref().cmp(other) } } -#[stable(feature = "manually_drop", since = "1.20.0")] +#[stable(feature = "manually_drop_impls", since = "1.22.0")] impl ::hash::Hash for ManuallyDrop { fn hash(&self, state: &mut H) { self.deref().hash(state); diff --git a/src/libcore/str/mod.rs b/src/libcore/str/mod.rs index 1ca995cae6d..765b369e4b2 100644 --- a/src/libcore/str/mod.rs +++ b/src/libcore/str/mod.rs @@ -1997,7 +1997,9 @@ fn index_mut(self, slice: &mut str) -> &mut Self::Output { } } - #[stable(feature = "str_checked_slicing", since = "1.20.0")] + #[unstable(feature = "inclusive_range", + reason = "recently added, follows RFC", + issue = "28237")] impl SliceIndex for ops::RangeInclusive { type Output = str; #[inline] @@ -2040,7 +2042,9 @@ fn index_mut(self, slice: &mut str) -> &mut Self::Output { - #[stable(feature = "str_checked_slicing", since = "1.20.0")] + #[unstable(feature = "inclusive_range", + reason = "recently added, follows RFC", + issue = "28237")] impl SliceIndex for ops::RangeToInclusive { type Output = str; #[inline] diff --git a/src/libcore/sync/atomic.rs b/src/libcore/sync/atomic.rs index e334d2014af..3da9e9c87dd 100644 --- a/src/libcore/sync/atomic.rs +++ b/src/libcore/sync/atomic.rs @@ -944,6 +944,7 @@ macro_rules! atomic_int { $stable_cxchg:meta, $stable_debug:meta, $stable_access:meta, + $stable_from:meta, $s_int_type:expr, $int_ref:expr, $int_type:ident $atomic_type:ident $atomic_init:ident) => { /// An integer type which can be safely shared between threads. @@ -978,7 +979,7 @@ fn default() -> Self { } } - #[stable(feature = "atomic_from", since = "1.23.0")] + #[$stable_from] impl From<$int_type> for $atomic_type { #[inline] fn from(v: $int_type) -> Self { Self::new(v) } @@ -1375,6 +1376,7 @@ pub fn fetch_xor(&self, val: $int_type, order: Ordering) -> $int_type { 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 AtomicI8 ATOMIC_I8_INIT } @@ -1384,6 +1386,7 @@ pub fn fetch_xor(&self, val: $int_type, order: Ordering) -> $int_type { 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 AtomicU8 ATOMIC_U8_INIT } @@ -1393,6 +1396,7 @@ pub fn fetch_xor(&self, val: $int_type, order: Ordering) -> $int_type { 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 AtomicI16 ATOMIC_I16_INIT } @@ -1402,6 +1406,7 @@ pub fn fetch_xor(&self, val: $int_type, order: Ordering) -> $int_type { 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 AtomicU16 ATOMIC_U16_INIT } @@ -1411,6 +1416,7 @@ pub fn fetch_xor(&self, val: $int_type, order: Ordering) -> $int_type { 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 AtomicI32 ATOMIC_I32_INIT } @@ -1420,6 +1426,7 @@ pub fn fetch_xor(&self, val: $int_type, order: Ordering) -> $int_type { 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 AtomicU32 ATOMIC_U32_INIT } @@ -1429,6 +1436,7 @@ pub fn fetch_xor(&self, val: $int_type, order: Ordering) -> $int_type { 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 AtomicI64 ATOMIC_I64_INIT } @@ -1438,6 +1446,7 @@ pub fn fetch_xor(&self, val: $int_type, order: Ordering) -> $int_type { 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 AtomicU64 ATOMIC_U64_INIT } @@ -1447,6 +1456,7 @@ pub fn fetch_xor(&self, val: $int_type, order: Ordering) -> $int_type { stable(feature = "extended_compare_and_swap", since = "1.10.0"), stable(feature = "atomic_debug", since = "1.3.0"), stable(feature = "atomic_access", since = "1.15.0"), + stable(feature = "atomic_from", since = "1.23.0"), "isize", "../../../std/primitive.isize.html", isize AtomicIsize ATOMIC_ISIZE_INIT } @@ -1456,6 +1466,7 @@ pub fn fetch_xor(&self, val: $int_type, order: Ordering) -> $int_type { stable(feature = "extended_compare_and_swap", since = "1.10.0"), stable(feature = "atomic_debug", since = "1.3.0"), stable(feature = "atomic_access", since = "1.15.0"), + stable(feature = "atomic_from", since = "1.23.0"), "usize", "../../../std/primitive.usize.html", usize AtomicUsize ATOMIC_USIZE_INIT } diff --git a/src/libstd/ffi/c_str.rs b/src/libstd/ffi/c_str.rs index a2022a2eeb2..a19fe825f21 100644 --- a/src/libstd/ffi/c_str.rs +++ b/src/libstd/ffi/c_str.rs @@ -706,7 +706,7 @@ fn from(s: CString) -> Box { } } -#[stable(feature = "shared_from_slice2", since = "1.23.0")] +#[stable(feature = "shared_from_slice2", since = "1.24.0")] impl From for Arc { #[inline] fn from(s: CString) -> Arc { @@ -715,7 +715,7 @@ fn from(s: CString) -> Arc { } } -#[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 { #[inline] fn from(s: &CStr) -> Arc { @@ -724,7 +724,7 @@ fn from(s: &CStr) -> Arc { } } -#[stable(feature = "shared_from_slice2", since = "1.23.0")] +#[stable(feature = "shared_from_slice2", since = "1.24.0")] impl From for Rc { #[inline] fn from(s: CString) -> Rc { @@ -733,7 +733,7 @@ fn from(s: CString) -> Rc { } } -#[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 { #[inline] fn from(s: &CStr) -> Rc { diff --git a/src/libstd/ffi/os_str.rs b/src/libstd/ffi/os_str.rs index cb902461f39..109173d31c5 100644 --- a/src/libstd/ffi/os_str.rs +++ b/src/libstd/ffi/os_str.rs @@ -594,7 +594,7 @@ fn from(s: OsString) -> Box { } } -#[stable(feature = "shared_from_slice2", since = "1.23.0")] +#[stable(feature = "shared_from_slice2", since = "1.24.0")] impl From for Arc { #[inline] fn from(s: OsString) -> Arc { @@ -603,7 +603,7 @@ fn from(s: OsString) -> Arc { } } -#[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 { #[inline] fn from(s: &OsStr) -> Arc { @@ -612,7 +612,7 @@ fn from(s: &OsStr) -> Arc { } } -#[stable(feature = "shared_from_slice2", since = "1.23.0")] +#[stable(feature = "shared_from_slice2", since = "1.24.0")] impl From for Rc { #[inline] fn from(s: OsString) -> Rc { @@ -621,7 +621,7 @@ fn from(s: OsString) -> Rc { } } -#[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 { #[inline] fn from(s: &OsStr) -> Rc { diff --git a/src/libstd/path.rs b/src/libstd/path.rs index eb125a4737a..bed9efcb846 100644 --- a/src/libstd/path.rs +++ b/src/libstd/path.rs @@ -1454,7 +1454,7 @@ fn from(s: PathBuf) -> Cow<'a, Path> { } } -#[stable(feature = "shared_from_slice2", since = "1.23.0")] +#[stable(feature = "shared_from_slice2", since = "1.24.0")] impl From for Arc { #[inline] fn from(s: PathBuf) -> Arc { @@ -1463,7 +1463,7 @@ fn from(s: PathBuf) -> Arc { } } -#[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 { #[inline] fn from(s: &Path) -> Arc { @@ -1472,7 +1472,7 @@ fn from(s: &Path) -> Arc { } } -#[stable(feature = "shared_from_slice2", since = "1.23.0")] +#[stable(feature = "shared_from_slice2", since = "1.24.0")] impl From for Rc { #[inline] fn from(s: PathBuf) -> Rc { @@ -1481,7 +1481,7 @@ fn from(s: PathBuf) -> Rc { } } -#[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 { #[inline] fn from(s: &Path) -> Rc { diff --git a/src/libstd/sync/mutex.rs b/src/libstd/sync/mutex.rs index 81f5594bc52..3b4904c98e8 100644 --- a/src/libstd/sync/mutex.rs +++ b/src/libstd/sync/mutex.rs @@ -382,7 +382,7 @@ fn drop(&mut self) { } } -#[stable(feature = "mutex_from", since = "1.22.0")] +#[stable(feature = "mutex_from", since = "1.24.0")] impl From for Mutex { /// Creates a new mutex in an unlocked state ready for use. /// This is equivalent to [`Mutex::new`]. diff --git a/src/libstd/sync/rwlock.rs b/src/libstd/sync/rwlock.rs index fd6cff6b69c..0f3f4e50f7e 100644 --- a/src/libstd/sync/rwlock.rs +++ b/src/libstd/sync/rwlock.rs @@ -457,7 +457,7 @@ fn default() -> RwLock { } } -#[stable(feature = "rw_lock_from", since = "1.22.0")] +#[stable(feature = "rw_lock_from", since = "1.24.0")] impl From for RwLock { /// Creates a new instance of an `RwLock` which is unlocked. /// This is equivalent to [`RwLock::new`].