Skip to content

Correct some stability attributes #43137

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 12, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/liballoc/boxed.rs
Original file line number Diff line number Diff line change
@@ -726,14 +726,14 @@ impl<T: Clone> Clone for Box<[T]> {
}
}

#[stable(feature = "rust1", since = "1.0.0")]
#[stable(feature = "box_borrow", since = "1.1.0")]
impl<T: ?Sized> borrow::Borrow<T> for Box<T> {
fn borrow(&self) -> &T {
&**self
}
}

#[stable(feature = "rust1", since = "1.0.0")]
#[stable(feature = "box_borrow", since = "1.1.0")]
impl<T: ?Sized> borrow::BorrowMut<T> for Box<T> {
fn borrow_mut(&mut self) -> &mut T {
&mut **self
4 changes: 2 additions & 2 deletions src/libcore/cell.rs
Original file line number Diff line number Diff line change
@@ -942,7 +942,7 @@ impl<'b, T: ?Sized> Ref<'b, T> {
#[unstable(feature = "coerce_unsized", issue = "27732")]
impl<'b, T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<Ref<'b, U>> for Ref<'b, T> {}

#[stable(feature = "std_guard_impls", since = "1.20")]
#[stable(feature = "std_guard_impls", since = "1.20.0")]
impl<'a, T: ?Sized + fmt::Display> fmt::Display for Ref<'a, T> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
self.value.fmt(f)
@@ -1041,7 +1041,7 @@ impl<'b, T: ?Sized> DerefMut for RefMut<'b, T> {
#[unstable(feature = "coerce_unsized", issue = "27732")]
impl<'b, T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<RefMut<'b, U>> for RefMut<'b, T> {}

#[stable(feature = "std_guard_impls", since = "1.20")]
#[stable(feature = "std_guard_impls", since = "1.20.0")]
impl<'a, T: ?Sized + fmt::Display> fmt::Display for RefMut<'a, T> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
self.value.fmt(f)
6 changes: 3 additions & 3 deletions src/libcore/char.rs
Original file line number Diff line number Diff line change
@@ -210,7 +210,7 @@ impl From<u8> for char {


/// An error which can be returned when parsing a char.
#[stable(feature = "char_from_str", since = "1.19.0")]
#[stable(feature = "char_from_str", since = "1.20.0")]
#[derive(Clone, Debug)]
pub struct ParseCharError {
kind: CharErrorKind,
@@ -237,15 +237,15 @@ enum CharErrorKind {
TooManyChars,
}

#[stable(feature = "char_from_str", since = "1.19.0")]
#[stable(feature = "char_from_str", since = "1.20.0")]
impl fmt::Display for ParseCharError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
self.__description().fmt(f)
}
}


#[stable(feature = "char_from_str", since = "1.19.0")]
#[stable(feature = "char_from_str", since = "1.20.0")]
impl FromStr for char {
type Err = ParseCharError;

2 changes: 1 addition & 1 deletion src/libstd/error.rs
Original file line number Diff line number Diff line change
@@ -340,7 +340,7 @@ impl Error for char::CharTryFromError {
}
}

#[stable(feature = "char_from_str", since = "1.19.0")]
#[stable(feature = "char_from_str", since = "1.20.0")]
impl Error for char::ParseCharError {
fn description(&self) -> &str {
self.__description()
2 changes: 1 addition & 1 deletion src/libstd/sync/mutex.rs
Original file line number Diff line number Diff line change
@@ -440,7 +440,7 @@ impl<'a, T: ?Sized + fmt::Debug> fmt::Debug for MutexGuard<'a, T> {
}
}

#[stable(feature = "std_guard_impls", since = "1.20")]
#[stable(feature = "std_guard_impls", since = "1.20.0")]
impl<'a, T: ?Sized + fmt::Display> fmt::Display for MutexGuard<'a, T> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
(**self).fmt(f)
4 changes: 2 additions & 2 deletions src/libstd/sync/rwlock.rs
Original file line number Diff line number Diff line change
@@ -370,7 +370,7 @@ impl<'a, T: fmt::Debug> fmt::Debug for RwLockReadGuard<'a, T> {
}
}

#[stable(feature = "std_guard_impls", since = "1.20")]
#[stable(feature = "std_guard_impls", since = "1.20.0")]
impl<'a, T: ?Sized + fmt::Display> fmt::Display for RwLockReadGuard<'a, T> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
(**self).fmt(f)
@@ -386,7 +386,7 @@ impl<'a, T: fmt::Debug> fmt::Debug for RwLockWriteGuard<'a, T> {
}
}

#[stable(feature = "std_guard_impls", since = "1.20")]
#[stable(feature = "std_guard_impls", since = "1.20.0")]
impl<'a, T: ?Sized + fmt::Display> fmt::Display for RwLockWriteGuard<'a, T> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
(**self).fmt(f)
2 changes: 1 addition & 1 deletion src/libstd_unicode/char.rs
Original file line number Diff line number Diff line change
@@ -38,7 +38,7 @@ use tables::{conversions, derived_property, general_category, property};
pub use core::char::{MAX, from_digit, from_u32, from_u32_unchecked};
#[stable(feature = "rust1", since = "1.0.0")]
pub use core::char::{EscapeDebug, EscapeDefault, EscapeUnicode};
#[stable(feature = "char_from_str", since = "1.19.0")]
#[stable(feature = "char_from_str", since = "1.20.0")]
pub use core::char::ParseCharError;

// unstable reexports