Skip to content

Commit

Permalink
Correct a few stability attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
ollie27 committed Dec 27, 2017
1 parent 0efdfa1 commit a8d107b
Show file tree
Hide file tree
Showing 8 changed files with 39 additions and 24 deletions.
14 changes: 7 additions & 7 deletions src/libcore/mem.rs
Expand Up @@ -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> {
fn clone(&self) -> Self {
ManuallyDrop::new(self.deref().clone())
Expand All @@ -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> {
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<T: PartialEq> PartialEq for ManuallyDrop<T> {
fn eq(&self, other: &Self) -> bool {
self.deref().eq(other)
Expand All @@ -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> {}

#[stable(feature = "manually_drop", since = "1.20.0")]
#[stable(feature = "manually_drop_impls", since = "1.22.0")]
impl<T: PartialOrd> PartialOrd for ManuallyDrop<T> {
fn partial_cmp(&self, other: &Self) -> Option<::cmp::Ordering> {
self.deref().partial_cmp(other)
Expand All @@ -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> {
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<T: ::hash::Hash> ::hash::Hash for ManuallyDrop<T> {
fn hash<H: ::hash::Hasher>(&self, state: &mut H) {
self.deref().hash(state);
Expand Down
8 changes: 6 additions & 2 deletions src/libcore/str/mod.rs
Expand Up @@ -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> {
type Output = str;
#[inline]
Expand Down Expand Up @@ -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> {
type Output = str;
#[inline]
Expand Down
13 changes: 12 additions & 1 deletion src/libcore/sync/atomic.rs
Expand Up @@ -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.
Expand Down Expand Up @@ -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 {
#[inline]
fn from(v: $int_type) -> Self { Self::new(v) }
Expand Down Expand Up @@ -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"),
"i8", "../../../std/primitive.i8.html",
i8 AtomicI8 ATOMIC_I8_INIT
}
Expand All @@ -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"),
"u8", "../../../std/primitive.u8.html",
u8 AtomicU8 ATOMIC_U8_INIT
}
Expand All @@ -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"),
"i16", "../../../std/primitive.i16.html",
i16 AtomicI16 ATOMIC_I16_INIT
}
Expand All @@ -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"),
"u16", "../../../std/primitive.u16.html",
u16 AtomicU16 ATOMIC_U16_INIT
}
Expand All @@ -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"),
"i32", "../../../std/primitive.i32.html",
i32 AtomicI32 ATOMIC_I32_INIT
}
Expand All @@ -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"),
"u32", "../../../std/primitive.u32.html",
u32 AtomicU32 ATOMIC_U32_INIT
}
Expand All @@ -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"),
"i64", "../../../std/primitive.i64.html",
i64 AtomicI64 ATOMIC_I64_INIT
}
Expand All @@ -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"),
"u64", "../../../std/primitive.u64.html",
u64 AtomicU64 ATOMIC_U64_INIT
}
Expand All @@ -1447,6 +1456,7 @@ atomic_int!{
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
}
Expand All @@ -1456,6 +1466,7 @@ atomic_int!{
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
}
Expand Down
8 changes: 4 additions & 4 deletions src/libstd/ffi/c_str.rs
Expand Up @@ -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> {
#[inline]
fn from(s: CString) -> Arc<CStr> {
Expand All @@ -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> {
#[inline]
fn from(s: &CStr) -> Arc<CStr> {
Expand All @@ -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> {
#[inline]
fn from(s: CString) -> Rc<CStr> {
Expand All @@ -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> {
#[inline]
fn from(s: &CStr) -> Rc<CStr> {
Expand Down
8 changes: 4 additions & 4 deletions src/libstd/ffi/os_str.rs
Expand Up @@ -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> {
#[inline]
fn from(s: OsString) -> Arc<OsStr> {
Expand All @@ -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> {
#[inline]
fn from(s: &OsStr) -> Arc<OsStr> {
Expand All @@ -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> {
#[inline]
fn from(s: OsString) -> Rc<OsStr> {
Expand All @@ -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> {
#[inline]
fn from(s: &OsStr) -> Rc<OsStr> {
Expand Down
8 changes: 4 additions & 4 deletions src/libstd/path.rs
Expand Up @@ -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> {
#[inline]
fn from(s: PathBuf) -> Arc<Path> {
Expand All @@ -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> {
#[inline]
fn from(s: &Path) -> Arc<Path> {
Expand All @@ -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> {
#[inline]
fn from(s: PathBuf) -> Rc<Path> {
Expand All @@ -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> {
#[inline]
fn from(s: &Path) -> Rc<Path> {
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/sync/mutex.rs
Expand Up @@ -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> {
/// Creates a new mutex in an unlocked state ready for use.
/// This is equivalent to [`Mutex::new`].
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/sync/rwlock.rs
Expand Up @@ -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> {
/// Creates a new instance of an `RwLock<T>` which is unlocked.
/// This is equivalent to [`RwLock::new`].
Expand Down

0 comments on commit a8d107b

Please sign in to comment.