Skip to content

Commit 2143a9f

Browse files
committed
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
2 parents 7cd8f69 + 2ef07f0 commit 2143a9f

File tree

30 files changed

+0
-39
lines changed

30 files changed

+0
-39
lines changed

src/liballoc/arc.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -881,7 +881,6 @@ impl<T> fmt::Pointer for Arc<T> {
881881

882882
#[stable(feature = "rust1", since = "1.0.0")]
883883
impl<T: Default> Default for Arc<T> {
884-
#[stable(feature = "rust1", since = "1.0.0")]
885884
fn default() -> Arc<T> {
886885
Arc::new(Default::default())
887886
}

src/liballoc/boxed.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,15 +264,13 @@ impl<T : ?Sized> Box<T> {
264264

265265
#[stable(feature = "rust1", since = "1.0.0")]
266266
impl<T: Default> Default for Box<T> {
267-
#[stable(feature = "rust1", since = "1.0.0")]
268267
fn default() -> Box<T> {
269268
box Default::default()
270269
}
271270
}
272271

273272
#[stable(feature = "rust1", since = "1.0.0")]
274273
impl<T> Default for Box<[T]> {
275-
#[stable(feature = "rust1", since = "1.0.0")]
276274
fn default() -> Box<[T]> {
277275
Box::<[T; 0]>::new([])
278276
}

src/liballoc/rc.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,6 @@ impl<T: Default> Default for Rc<T> {
508508
/// let x: Rc<i32> = Default::default();
509509
/// ```
510510
#[inline]
511-
#[stable(feature = "rust1", since = "1.0.0")]
512511
fn default() -> Rc<T> {
513512
Rc::new(Default::default())
514513
}

src/libcollections/btree/map.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -903,7 +903,6 @@ impl<K: Hash, V: Hash> Hash for BTreeMap<K, V> {
903903

904904
#[stable(feature = "rust1", since = "1.0.0")]
905905
impl<K: Ord, V> Default for BTreeMap<K, V> {
906-
#[stable(feature = "rust1", since = "1.0.0")]
907906
fn default() -> BTreeMap<K, V> {
908907
BTreeMap::new()
909908
}

src/libcollections/btree/set.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,6 @@ impl<'a, T: 'a + Ord + Copy> Extend<&'a T> for BTreeSet<T> {
559559

560560
#[stable(feature = "rust1", since = "1.0.0")]
561561
impl<T: Ord> Default for BTreeSet<T> {
562-
#[stable(feature = "rust1", since = "1.0.0")]
563562
fn default() -> BTreeSet<T> {
564563
BTreeSet::new()
565564
}

src/libcollections/linked_list.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,6 @@ impl<T> LinkedList<T> {
230230
#[stable(feature = "rust1", since = "1.0.0")]
231231
impl<T> Default for LinkedList<T> {
232232
#[inline]
233-
#[stable(feature = "rust1", since = "1.0.0")]
234233
fn default() -> LinkedList<T> { LinkedList::new() }
235234
}
236235

src/libcollections/slice.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,6 @@ mod hack {
160160
/// Allocating extension methods for slices.
161161
#[lang = "slice"]
162162
#[cfg(not(test))]
163-
#[stable(feature = "rust1", since = "1.0.0")]
164163
impl<T> [T] {
165164
/// Returns the number of elements in the slice.
166165
///

src/libcollections/str.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,6 @@ impl ToOwned for str {
153153
/// Any string that can be represented as a slice.
154154
#[lang = "str"]
155155
#[cfg(not(test))]
156-
#[stable(feature = "rust1", since = "1.0.0")]
157156
impl str {
158157
/// Returns the length of `self` in bytes.
159158
///

src/libcollections/string.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -990,7 +990,6 @@ impl_eq! { Cow<'a, str>, String }
990990
#[stable(feature = "rust1", since = "1.0.0")]
991991
impl Default for String {
992992
#[inline]
993-
#[stable(feature = "rust1", since = "1.0.0")]
994993
fn default() -> String {
995994
String::new()
996995
}

src/libcollections/vec.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1401,7 +1401,6 @@ impl<T> Drop for Vec<T> {
14011401

14021402
#[stable(feature = "rust1", since = "1.0.0")]
14031403
impl<T> Default for Vec<T> {
1404-
#[stable(feature = "rust1", since = "1.0.0")]
14051404
fn default() -> Vec<T> {
14061405
Vec::new()
14071406
}

src/libcore/cell.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,6 @@ impl<T:Copy> Clone for Cell<T> {
249249

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

469468
#[stable(feature = "rust1", since = "1.0.0")]
470469
impl<T:Default> Default for RefCell<T> {
471-
#[stable(feature = "rust1", since = "1.0.0")]
472470
#[inline]
473471
fn default() -> RefCell<T> {
474472
RefCell::new(Default::default())

src/libcore/cmp.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,6 @@ impl Eq for Ordering {}
199199
#[stable(feature = "rust1", since = "1.0.0")]
200200
impl Ord for Ordering {
201201
#[inline]
202-
#[stable(feature = "rust1", since = "1.0.0")]
203202
fn cmp(&self, other: &Ordering) -> Ordering {
204203
(*self as i32).cmp(&(*other as i32))
205204
}
@@ -208,7 +207,6 @@ impl Ord for Ordering {
208207
#[stable(feature = "rust1", since = "1.0.0")]
209208
impl PartialOrd for Ordering {
210209
#[inline]
211-
#[stable(feature = "rust1", since = "1.0.0")]
212210
fn partial_cmp(&self, other: &Ordering) -> Option<Ordering> {
213211
(*self as i32).partial_cmp(&(*other as i32))
214212
}

src/libcore/default.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,6 @@ macro_rules! default_impl {
133133
#[stable(feature = "rust1", since = "1.0.0")]
134134
impl Default for $t {
135135
#[inline]
136-
#[stable(feature = "rust1", since = "1.0.0")]
137136
fn default() -> $t { $v }
138137
}
139138
}

src/libcore/iter.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3386,7 +3386,6 @@ impl<I: Iterator> Iterator for Peekable<I> {
33863386
#[stable(feature = "rust1", since = "1.0.0")]
33873387
impl<I: ExactSizeIterator> ExactSizeIterator for Peekable<I> {}
33883388

3389-
#[stable(feature = "rust1", since = "1.0.0")]
33903389
impl<I: Iterator> Peekable<I> {
33913390
/// Returns a reference to the next() value without advancing the iterator.
33923391
///

src/libcore/num/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1636,7 +1636,6 @@ macro_rules! impl_from {
16361636
($Small: ty, $Large: ty) => {
16371637
#[stable(feature = "lossless_prim_conv", since = "1.5.0")]
16381638
impl From<$Small> for $Large {
1639-
#[stable(feature = "lossless_prim_conv", since = "1.5.0")]
16401639
#[inline]
16411640
fn from(small: $Small) -> $Large {
16421641
small as $Large

src/libcore/ops.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -542,11 +542,9 @@ macro_rules! neg_impl_core {
542542
($id:ident => $body:expr, $($t:ty)*) => ($(
543543
#[stable(feature = "rust1", since = "1.0.0")]
544544
impl Neg for $t {
545-
#[stable(feature = "rust1", since = "1.0.0")]
546545
type Output = $t;
547546

548547
#[inline]
549-
#[stable(feature = "rust1", since = "1.0.0")]
550548
fn neg(self) -> $t { let $id = self; $body }
551549
}
552550

src/libcore/option.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -756,7 +756,6 @@ impl<T: Default> Option<T> {
756756
#[stable(feature = "rust1", since = "1.0.0")]
757757
impl<T> Default for Option<T> {
758758
#[inline]
759-
#[stable(feature = "rust1", since = "1.0.0")]
760759
fn default() -> Option<T> { None }
761760
}
762761

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

src/libcore/ptr.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,6 @@ pub unsafe fn write<T>(dst: *mut T, src: T) {
161161
intrinsics::move_val_init(&mut *dst, src)
162162
}
163163

164-
#[stable(feature = "rust1", since = "1.0.0")]
165164
#[lang = "const_ptr"]
166165
impl<T: ?Sized> *const T {
167166
/// Returns true if the pointer is null.
@@ -210,7 +209,6 @@ impl<T: ?Sized> *const T {
210209
}
211210
}
212211

213-
#[stable(feature = "rust1", since = "1.0.0")]
214212
#[lang = "mut_ptr"]
215213
impl<T: ?Sized> *mut T {
216214
/// Returns true if the pointer is null.

src/libcore/result.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,6 @@ pub enum Result<T, E> {
257257
// Type implementation
258258
/////////////////////////////////////////////////////////////////////////////
259259

260-
#[stable(feature = "rust1", since = "1.0.0")]
261260
impl<T, E> Result<T, E> {
262261
/////////////////////////////////////////////////////////////////////////
263262
// Querying the contained values
@@ -708,7 +707,6 @@ impl<T, E> Result<T, E> {
708707
}
709708
}
710709

711-
#[stable(feature = "rust1", since = "1.0.0")]
712710
impl<T, E: fmt::Debug> Result<T, E> {
713711
/// Unwraps a result, yielding the content of an `Ok`.
714712
///
@@ -758,7 +756,6 @@ impl<T, E: fmt::Debug> Result<T, E> {
758756
}
759757
}
760758

761-
#[stable(feature = "rust1", since = "1.0.0")]
762759
impl<T: fmt::Debug, E> Result<T, E> {
763760
/// Unwraps a result, yielding the content of an `Err`.
764761
///

src/libcore/slice.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,6 @@ impl<T> ops::IndexMut<RangeFull> for [T] {
651651

652652
#[stable(feature = "rust1", since = "1.0.0")]
653653
impl<'a, T> Default for &'a [T] {
654-
#[stable(feature = "rust1", since = "1.0.0")]
655654
fn default() -> &'a [T] { &[] }
656655
}
657656

src/libcore/str/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1826,6 +1826,5 @@ fn char_range_at_raw(bytes: &[u8], i: usize) -> (u32, usize) {
18261826

18271827
#[stable(feature = "rust1", since = "1.0.0")]
18281828
impl<'a> Default for &'a str {
1829-
#[stable(feature = "rust1", since = "1.0.0")]
18301829
fn default() -> &'a str { "" }
18311830
}

src/libcore/sync/atomic.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,6 @@ impl AtomicBool {
438438
}
439439
}
440440

441-
#[stable(feature = "rust1", since = "1.0.0")]
442441
impl AtomicIsize {
443442
/// Creates a new `AtomicIsize`.
444443
///
@@ -631,7 +630,6 @@ impl AtomicIsize {
631630
}
632631
}
633632

634-
#[stable(feature = "rust1", since = "1.0.0")]
635633
impl AtomicUsize {
636634
/// Creates a new `AtomicUsize`.
637635
///

src/libcore/tuple.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@ macro_rules! tuple_impls {
105105

106106
#[stable(feature = "rust1", since = "1.0.0")]
107107
impl<$($T:Default),+> Default for ($($T,)+) {
108-
#[stable(feature = "rust1", since = "1.0.0")]
109108
#[inline]
110109
fn default() -> ($($T,)+) {
111110
($({ let x: $T = Default::default(); x},)+)

src/librand/reseeding.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ impl<R: Rng + Default> Reseeder<R> for ReseedWithDefault {
113113
}
114114
#[stable(feature = "rust1", since = "1.0.0")]
115115
impl Default for ReseedWithDefault {
116-
#[stable(feature = "rust1", since = "1.0.0")]
117116
fn default() -> ReseedWithDefault {
118117
ReseedWithDefault
119118
}

src/librustc_unicode/char.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ impl Iterator for CaseMappingIter {
111111
}
112112
}
113113

114-
#[stable(feature = "rust1", since = "1.0.0")]
115114
#[lang = "char"]
116115
impl char {
117116
/// Checks if a `char` is a digit in the given radix.

src/libstd/collections/hash/set.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -675,7 +675,6 @@ impl<T, S> Default for HashSet<T, S>
675675
where T: Eq + Hash,
676676
S: HashState + Default,
677677
{
678-
#[stable(feature = "rust1", since = "1.0.0")]
679678
fn default() -> HashSet<T, S> {
680679
HashSet::with_hash_state(Default::default())
681680
}

src/libstd/fs.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -677,7 +677,6 @@ impl Iterator for ReadDir {
677677
}
678678
}
679679

680-
#[stable(feature = "rust1", since = "1.0.0")]
681680
impl DirEntry {
682681
/// Returns the full path to the file that this entry represents.
683682
///

src/libstd/io/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1534,7 +1534,6 @@ pub struct Take<T> {
15341534
limit: u64,
15351535
}
15361536

1537-
#[stable(feature = "rust1", since = "1.0.0")]
15381537
impl<T> Take<T> {
15391538
/// Returns the number of bytes that can be read before this instance will
15401539
/// return EOF.

src/libstd/num/f32.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,6 @@ mod cmath {
120120

121121
#[cfg(not(test))]
122122
#[lang = "f32"]
123-
#[stable(feature = "rust1", since = "1.0.0")]
124123
impl f32 {
125124
/// Parses a float as with a given radix
126125
#[unstable(feature = "float_from_str_radix", reason = "recently moved API",

src/libstd/num/f64.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ mod cmath {
7777

7878
#[cfg(not(test))]
7979
#[lang = "f64"]
80-
#[stable(feature = "rust1", since = "1.0.0")]
8180
impl f64 {
8281
/// Parses a float as with a given radix
8382
#[unstable(feature = "float_from_str_radix", reason = "recently moved API",

0 commit comments

Comments
 (0)