Auto merge of #29643 - petrochenkov:stability5, r=alexcrichton

Also remove `stable` stability annotations from inherent impls

(There will be a warning for useless stability annotations soon.)

r? @Gankro
This commit is contained in:
bors 2015-11-06 14:57:41 +00:00
commit 2143a9ff9a
30 changed files with 0 additions and 39 deletions

View file

@ -881,7 +881,6 @@ impl<T> fmt::Pointer for Arc<T> {
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
impl<T: Default> Default for Arc<T> { impl<T: Default> Default for Arc<T> {
#[stable(feature = "rust1", since = "1.0.0")]
fn default() -> Arc<T> { fn default() -> Arc<T> {
Arc::new(Default::default()) Arc::new(Default::default())
} }

View file

@ -264,7 +264,6 @@ impl<T : ?Sized> Box<T> {
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
impl<T: Default> Default for Box<T> { impl<T: Default> Default for Box<T> {
#[stable(feature = "rust1", since = "1.0.0")]
fn default() -> Box<T> { fn default() -> Box<T> {
box Default::default() box Default::default()
} }
@ -272,7 +271,6 @@ impl<T: Default> Default for Box<T> {
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
impl<T> Default for Box<[T]> { impl<T> Default for Box<[T]> {
#[stable(feature = "rust1", since = "1.0.0")]
fn default() -> Box<[T]> { fn default() -> Box<[T]> {
Box::<[T; 0]>::new([]) Box::<[T; 0]>::new([])
} }

View file

@ -508,7 +508,6 @@ impl<T: Default> Default for Rc<T> {
/// let x: Rc<i32> = Default::default(); /// let x: Rc<i32> = Default::default();
/// ``` /// ```
#[inline] #[inline]
#[stable(feature = "rust1", since = "1.0.0")]
fn default() -> Rc<T> { fn default() -> Rc<T> {
Rc::new(Default::default()) Rc::new(Default::default())
} }

View file

@ -903,7 +903,6 @@ impl<K: Hash, V: Hash> Hash for BTreeMap<K, V> {
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
impl<K: Ord, V> Default for BTreeMap<K, V> { impl<K: Ord, V> Default for BTreeMap<K, V> {
#[stable(feature = "rust1", since = "1.0.0")]
fn default() -> BTreeMap<K, V> { fn default() -> BTreeMap<K, V> {
BTreeMap::new() BTreeMap::new()
} }

View file

@ -559,7 +559,6 @@ impl<'a, T: 'a + Ord + Copy> Extend<&'a T> for BTreeSet<T> {
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
impl<T: Ord> Default for BTreeSet<T> { impl<T: Ord> Default for BTreeSet<T> {
#[stable(feature = "rust1", since = "1.0.0")]
fn default() -> BTreeSet<T> { fn default() -> BTreeSet<T> {
BTreeSet::new() BTreeSet::new()
} }

View file

@ -230,7 +230,6 @@ impl<T> LinkedList<T> {
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
impl<T> Default for LinkedList<T> { impl<T> Default for LinkedList<T> {
#[inline] #[inline]
#[stable(feature = "rust1", since = "1.0.0")]
fn default() -> LinkedList<T> { LinkedList::new() } fn default() -> LinkedList<T> { LinkedList::new() }
} }

View file

@ -160,7 +160,6 @@ mod hack {
/// Allocating extension methods for slices. /// Allocating extension methods for slices.
#[lang = "slice"] #[lang = "slice"]
#[cfg(not(test))] #[cfg(not(test))]
#[stable(feature = "rust1", since = "1.0.0")]
impl<T> [T] { impl<T> [T] {
/// Returns the number of elements in the slice. /// Returns the number of elements in the slice.
/// ///

View file

@ -153,7 +153,6 @@ impl ToOwned for str {
/// Any string that can be represented as a slice. /// Any string that can be represented as a slice.
#[lang = "str"] #[lang = "str"]
#[cfg(not(test))] #[cfg(not(test))]
#[stable(feature = "rust1", since = "1.0.0")]
impl str { impl str {
/// Returns the length of `self` in bytes. /// Returns the length of `self` in bytes.
/// ///

View file

@ -990,7 +990,6 @@ impl_eq! { Cow<'a, str>, String }
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
impl Default for String { impl Default for String {
#[inline] #[inline]
#[stable(feature = "rust1", since = "1.0.0")]
fn default() -> String { fn default() -> String {
String::new() String::new()
} }

View file

@ -1401,7 +1401,6 @@ impl<T> Drop for Vec<T> {
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
impl<T> Default for Vec<T> { impl<T> Default for Vec<T> {
#[stable(feature = "rust1", since = "1.0.0")]
fn default() -> Vec<T> { fn default() -> Vec<T> {
Vec::new() Vec::new()
} }

View file

@ -249,7 +249,6 @@ impl<T:Copy> Clone for Cell<T> {
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
impl<T:Default + Copy> Default for Cell<T> { impl<T:Default + Copy> Default for Cell<T> {
#[stable(feature = "rust1", since = "1.0.0")]
#[inline] #[inline]
fn default() -> Cell<T> { fn default() -> Cell<T> {
Cell::new(Default::default()) Cell::new(Default::default())
@ -468,7 +467,6 @@ impl<T: Clone> Clone for RefCell<T> {
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
impl<T:Default> Default for RefCell<T> { impl<T:Default> Default for RefCell<T> {
#[stable(feature = "rust1", since = "1.0.0")]
#[inline] #[inline]
fn default() -> RefCell<T> { fn default() -> RefCell<T> {
RefCell::new(Default::default()) RefCell::new(Default::default())

View file

@ -199,7 +199,6 @@ impl Eq for Ordering {}
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
impl Ord for Ordering { impl Ord for Ordering {
#[inline] #[inline]
#[stable(feature = "rust1", since = "1.0.0")]
fn cmp(&self, other: &Ordering) -> Ordering { fn cmp(&self, other: &Ordering) -> Ordering {
(*self as i32).cmp(&(*other as i32)) (*self as i32).cmp(&(*other as i32))
} }
@ -208,7 +207,6 @@ impl Ord for Ordering {
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
impl PartialOrd for Ordering { impl PartialOrd for Ordering {
#[inline] #[inline]
#[stable(feature = "rust1", since = "1.0.0")]
fn partial_cmp(&self, other: &Ordering) -> Option<Ordering> { fn partial_cmp(&self, other: &Ordering) -> Option<Ordering> {
(*self as i32).partial_cmp(&(*other as i32)) (*self as i32).partial_cmp(&(*other as i32))
} }

View file

@ -133,7 +133,6 @@ macro_rules! default_impl {
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
impl Default for $t { impl Default for $t {
#[inline] #[inline]
#[stable(feature = "rust1", since = "1.0.0")]
fn default() -> $t { $v } fn default() -> $t { $v }
} }
} }

View file

@ -3386,7 +3386,6 @@ impl<I: Iterator> Iterator for Peekable<I> {
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
impl<I: ExactSizeIterator> ExactSizeIterator for Peekable<I> {} impl<I: ExactSizeIterator> ExactSizeIterator for Peekable<I> {}
#[stable(feature = "rust1", since = "1.0.0")]
impl<I: Iterator> Peekable<I> { impl<I: Iterator> Peekable<I> {
/// Returns a reference to the next() value without advancing the iterator. /// Returns a reference to the next() value without advancing the iterator.
/// ///

View file

@ -1636,7 +1636,6 @@ macro_rules! impl_from {
($Small: ty, $Large: ty) => { ($Small: ty, $Large: ty) => {
#[stable(feature = "lossless_prim_conv", since = "1.5.0")] #[stable(feature = "lossless_prim_conv", since = "1.5.0")]
impl From<$Small> for $Large { impl From<$Small> for $Large {
#[stable(feature = "lossless_prim_conv", since = "1.5.0")]
#[inline] #[inline]
fn from(small: $Small) -> $Large { fn from(small: $Small) -> $Large {
small as $Large small as $Large

View file

@ -542,11 +542,9 @@ macro_rules! neg_impl_core {
($id:ident => $body:expr, $($t:ty)*) => ($( ($id:ident => $body:expr, $($t:ty)*) => ($(
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
impl Neg for $t { impl Neg for $t {
#[stable(feature = "rust1", since = "1.0.0")]
type Output = $t; type Output = $t;
#[inline] #[inline]
#[stable(feature = "rust1", since = "1.0.0")]
fn neg(self) -> $t { let $id = self; $body } fn neg(self) -> $t { let $id = self; $body }
} }

View file

@ -756,7 +756,6 @@ impl<T: Default> Option<T> {
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
impl<T> Default for Option<T> { impl<T> Default for Option<T> {
#[inline] #[inline]
#[stable(feature = "rust1", since = "1.0.0")]
fn default() -> Option<T> { None } fn default() -> Option<T> { None }
} }
@ -940,7 +939,6 @@ impl<A, V: FromIterator<A>> FromIterator<Option<A>> for Option<V> {
/// assert!(res == Some(vec!(2, 3))); /// assert!(res == Some(vec!(2, 3)));
/// ``` /// ```
#[inline] #[inline]
#[stable(feature = "rust1", since = "1.0.0")]
fn from_iter<I: IntoIterator<Item=Option<A>>>(iter: I) -> Option<V> { fn from_iter<I: IntoIterator<Item=Option<A>>>(iter: I) -> Option<V> {
// FIXME(#11084): This could be replaced with Iterator::scan when this // FIXME(#11084): This could be replaced with Iterator::scan when this
// performance bug is closed. // performance bug is closed.

View file

@ -161,7 +161,6 @@ pub unsafe fn write<T>(dst: *mut T, src: T) {
intrinsics::move_val_init(&mut *dst, src) intrinsics::move_val_init(&mut *dst, src)
} }
#[stable(feature = "rust1", since = "1.0.0")]
#[lang = "const_ptr"] #[lang = "const_ptr"]
impl<T: ?Sized> *const T { impl<T: ?Sized> *const T {
/// Returns true if the pointer is null. /// Returns true if the pointer is null.
@ -210,7 +209,6 @@ impl<T: ?Sized> *const T {
} }
} }
#[stable(feature = "rust1", since = "1.0.0")]
#[lang = "mut_ptr"] #[lang = "mut_ptr"]
impl<T: ?Sized> *mut T { impl<T: ?Sized> *mut T {
/// Returns true if the pointer is null. /// Returns true if the pointer is null.

View file

@ -257,7 +257,6 @@ pub enum Result<T, E> {
// Type implementation // Type implementation
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#[stable(feature = "rust1", since = "1.0.0")]
impl<T, E> Result<T, E> { impl<T, E> Result<T, E> {
///////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////
// Querying the contained values // Querying the contained values
@ -708,7 +707,6 @@ impl<T, E> Result<T, E> {
} }
} }
#[stable(feature = "rust1", since = "1.0.0")]
impl<T, E: fmt::Debug> Result<T, E> { impl<T, E: fmt::Debug> Result<T, E> {
/// Unwraps a result, yielding the content of an `Ok`. /// Unwraps a result, yielding the content of an `Ok`.
/// ///
@ -758,7 +756,6 @@ impl<T, E: fmt::Debug> Result<T, E> {
} }
} }
#[stable(feature = "rust1", since = "1.0.0")]
impl<T: fmt::Debug, E> Result<T, E> { impl<T: fmt::Debug, E> Result<T, E> {
/// Unwraps a result, yielding the content of an `Err`. /// Unwraps a result, yielding the content of an `Err`.
/// ///

View file

@ -651,7 +651,6 @@ impl<T> ops::IndexMut<RangeFull> for [T] {
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
impl<'a, T> Default for &'a [T] { impl<'a, T> Default for &'a [T] {
#[stable(feature = "rust1", since = "1.0.0")]
fn default() -> &'a [T] { &[] } fn default() -> &'a [T] { &[] }
} }

View file

@ -1826,6 +1826,5 @@ fn char_range_at_raw(bytes: &[u8], i: usize) -> (u32, usize) {
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
impl<'a> Default for &'a str { impl<'a> Default for &'a str {
#[stable(feature = "rust1", since = "1.0.0")]
fn default() -> &'a str { "" } fn default() -> &'a str { "" }
} }

View file

@ -438,7 +438,6 @@ impl AtomicBool {
} }
} }
#[stable(feature = "rust1", since = "1.0.0")]
impl AtomicIsize { impl AtomicIsize {
/// Creates a new `AtomicIsize`. /// Creates a new `AtomicIsize`.
/// ///
@ -631,7 +630,6 @@ impl AtomicIsize {
} }
} }
#[stable(feature = "rust1", since = "1.0.0")]
impl AtomicUsize { impl AtomicUsize {
/// Creates a new `AtomicUsize`. /// Creates a new `AtomicUsize`.
/// ///

View file

@ -105,7 +105,6 @@ macro_rules! tuple_impls {
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
impl<$($T:Default),+> Default for ($($T,)+) { impl<$($T:Default),+> Default for ($($T,)+) {
#[stable(feature = "rust1", since = "1.0.0")]
#[inline] #[inline]
fn default() -> ($($T,)+) { fn default() -> ($($T,)+) {
($({ let x: $T = Default::default(); x},)+) ($({ let x: $T = Default::default(); x},)+)

View file

@ -113,7 +113,6 @@ impl<R: Rng + Default> Reseeder<R> for ReseedWithDefault {
} }
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
impl Default for ReseedWithDefault { impl Default for ReseedWithDefault {
#[stable(feature = "rust1", since = "1.0.0")]
fn default() -> ReseedWithDefault { fn default() -> ReseedWithDefault {
ReseedWithDefault ReseedWithDefault
} }

View file

@ -111,7 +111,6 @@ impl Iterator for CaseMappingIter {
} }
} }
#[stable(feature = "rust1", since = "1.0.0")]
#[lang = "char"] #[lang = "char"]
impl char { impl char {
/// Checks if a `char` is a digit in the given radix. /// Checks if a `char` is a digit in the given radix.

View file

@ -675,7 +675,6 @@ impl<T, S> Default for HashSet<T, S>
where T: Eq + Hash, where T: Eq + Hash,
S: HashState + Default, S: HashState + Default,
{ {
#[stable(feature = "rust1", since = "1.0.0")]
fn default() -> HashSet<T, S> { fn default() -> HashSet<T, S> {
HashSet::with_hash_state(Default::default()) HashSet::with_hash_state(Default::default())
} }

View file

@ -677,7 +677,6 @@ impl Iterator for ReadDir {
} }
} }
#[stable(feature = "rust1", since = "1.0.0")]
impl DirEntry { impl DirEntry {
/// Returns the full path to the file that this entry represents. /// Returns the full path to the file that this entry represents.
/// ///

View file

@ -1534,7 +1534,6 @@ pub struct Take<T> {
limit: u64, limit: u64,
} }
#[stable(feature = "rust1", since = "1.0.0")]
impl<T> Take<T> { impl<T> Take<T> {
/// Returns the number of bytes that can be read before this instance will /// Returns the number of bytes that can be read before this instance will
/// return EOF. /// return EOF.

View file

@ -120,7 +120,6 @@ mod cmath {
#[cfg(not(test))] #[cfg(not(test))]
#[lang = "f32"] #[lang = "f32"]
#[stable(feature = "rust1", since = "1.0.0")]
impl f32 { impl f32 {
/// Parses a float as with a given radix /// Parses a float as with a given radix
#[unstable(feature = "float_from_str_radix", reason = "recently moved API", #[unstable(feature = "float_from_str_radix", reason = "recently moved API",

View file

@ -77,7 +77,6 @@ mod cmath {
#[cfg(not(test))] #[cfg(not(test))]
#[lang = "f64"] #[lang = "f64"]
#[stable(feature = "rust1", since = "1.0.0")]
impl f64 { impl f64 {
/// Parses a float as with a given radix /// Parses a float as with a given radix
#[unstable(feature = "float_from_str_radix", reason = "recently moved API", #[unstable(feature = "float_from_str_radix", reason = "recently moved API",