Skip to content

Commit 2f703e4

Browse files
committed
Correct some stability versions
These were found by running tidy on stable versions of rust and finding features stabilised with the wrong version numbers.
1 parent 9f15631 commit 2f703e4

File tree

20 files changed

+98
-98
lines changed

20 files changed

+98
-98
lines changed

src/liballoc/boxed.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ impl<'a> From<&'a str> for Box<str> {
445445
}
446446
}
447447

448-
#[stable(feature = "boxed_str_conv", since = "1.18.0")]
448+
#[stable(feature = "boxed_str_conv", since = "1.19.0")]
449449
impl From<Box<str>> for Box<[u8]> {
450450
fn from(s: Box<str>) -> Self {
451451
unsafe {

src/libcollections/string.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1869,28 +1869,28 @@ impl ops::Index<ops::RangeToInclusive<usize>> for String {
18691869
}
18701870
}
18711871

1872-
#[stable(feature = "derefmut_for_string", since = "1.2.0")]
1872+
#[stable(feature = "derefmut_for_string", since = "1.3.0")]
18731873
impl ops::IndexMut<ops::Range<usize>> for String {
18741874
#[inline]
18751875
fn index_mut(&mut self, index: ops::Range<usize>) -> &mut str {
18761876
&mut self[..][index]
18771877
}
18781878
}
1879-
#[stable(feature = "derefmut_for_string", since = "1.2.0")]
1879+
#[stable(feature = "derefmut_for_string", since = "1.3.0")]
18801880
impl ops::IndexMut<ops::RangeTo<usize>> for String {
18811881
#[inline]
18821882
fn index_mut(&mut self, index: ops::RangeTo<usize>) -> &mut str {
18831883
&mut self[..][index]
18841884
}
18851885
}
1886-
#[stable(feature = "derefmut_for_string", since = "1.2.0")]
1886+
#[stable(feature = "derefmut_for_string", since = "1.3.0")]
18871887
impl ops::IndexMut<ops::RangeFrom<usize>> for String {
18881888
#[inline]
18891889
fn index_mut(&mut self, index: ops::RangeFrom<usize>) -> &mut str {
18901890
&mut self[..][index]
18911891
}
18921892
}
1893-
#[stable(feature = "derefmut_for_string", since = "1.2.0")]
1893+
#[stable(feature = "derefmut_for_string", since = "1.3.0")]
18941894
impl ops::IndexMut<ops::RangeFull> for String {
18951895
#[inline]
18961896
fn index_mut(&mut self, _index: ops::RangeFull) -> &mut str {
@@ -1922,7 +1922,7 @@ impl ops::Deref for String {
19221922
}
19231923
}
19241924

1925-
#[stable(feature = "derefmut_for_string", since = "1.2.0")]
1925+
#[stable(feature = "derefmut_for_string", since = "1.3.0")]
19261926
impl ops::DerefMut for String {
19271927
#[inline]
19281928
fn deref_mut(&mut self) -> &mut str {
@@ -2080,14 +2080,14 @@ impl<'a> From<&'a str> for String {
20802080

20812081
// note: test pulls in libstd, which causes errors here
20822082
#[cfg(not(test))]
2083-
#[stable(feature = "string_from_box", since = "1.17.0")]
2083+
#[stable(feature = "string_from_box", since = "1.18.0")]
20842084
impl From<Box<str>> for String {
20852085
fn from(s: Box<str>) -> String {
20862086
s.into_string()
20872087
}
20882088
}
20892089

2090-
#[stable(feature = "box_from_str", since = "1.17.0")]
2090+
#[stable(feature = "box_from_str", since = "1.18.0")]
20912091
impl Into<Box<str>> for String {
20922092
fn into(self) -> Box<str> {
20932093
self.into_boxed_str()

src/libcollections/vec.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2034,7 +2034,7 @@ impl<'a, T: Clone> From<&'a [T]> for Vec<T> {
20342034
}
20352035
}
20362036

2037-
#[stable(feature = "vec_from_mut", since = "1.21.0")]
2037+
#[stable(feature = "vec_from_mut", since = "1.19.0")]
20382038
impl<'a, T: Clone> From<&'a mut [T]> for Vec<T> {
20392039
#[cfg(not(test))]
20402040
fn from(s: &'a mut [T]) -> Vec<T> {
@@ -2055,14 +2055,14 @@ impl<'a, T> From<Cow<'a, [T]>> for Vec<T> where [T]: ToOwned<Owned=Vec<T>> {
20552055

20562056
// note: test pulls in libstd, which causes errors here
20572057
#[cfg(not(test))]
2058-
#[stable(feature = "vec_from_box", since = "1.17.0")]
2058+
#[stable(feature = "vec_from_box", since = "1.18.0")]
20592059
impl<T> From<Box<[T]>> for Vec<T> {
20602060
fn from(s: Box<[T]>) -> Vec<T> {
20612061
s.into_vec()
20622062
}
20632063
}
20642064

2065-
#[stable(feature = "box_from_vec", since = "1.17.0")]
2065+
#[stable(feature = "box_from_vec", since = "1.18.0")]
20662066
impl<T> Into<Box<[T]>> for Vec<T> {
20672067
fn into(self) -> Box<[T]> {
20682068
self.into_boxed_slice()
@@ -2080,14 +2080,14 @@ impl<'a> From<&'a str> for Vec<u8> {
20802080
// Clone-on-write
20812081
////////////////////////////////////////////////////////////////////////////////
20822082

2083-
#[stable(feature = "cow_from_vec", since = "1.7.0")]
2083+
#[stable(feature = "cow_from_vec", since = "1.8.0")]
20842084
impl<'a, T: Clone> From<&'a [T]> for Cow<'a, [T]> {
20852085
fn from(s: &'a [T]) -> Cow<'a, [T]> {
20862086
Cow::Borrowed(s)
20872087
}
20882088
}
20892089

2090-
#[stable(feature = "cow_from_vec", since = "1.7.0")]
2090+
#[stable(feature = "cow_from_vec", since = "1.8.0")]
20912091
impl<'a, T: Clone> From<Vec<T>> for Cow<'a, [T]> {
20922092
fn from(v: Vec<T>) -> Cow<'a, [T]> {
20932093
Cow::Owned(v)

src/libcore/cell.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1145,7 +1145,7 @@ impl<T: ?Sized> UnsafeCell<T> {
11451145
}
11461146
}
11471147

1148-
#[stable(feature = "unsafe_cell_default", since = "1.9.0")]
1148+
#[stable(feature = "unsafe_cell_default", since = "1.10.0")]
11491149
impl<T: Default> Default for UnsafeCell<T> {
11501150
/// Creates an `UnsafeCell`, with the `Default` value for T.
11511151
fn default() -> UnsafeCell<T> {

src/libcore/iter/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1655,7 +1655,7 @@ impl<I> Iterator for Skip<I> where I: Iterator {
16551655
#[stable(feature = "rust1", since = "1.0.0")]
16561656
impl<I> ExactSizeIterator for Skip<I> where I: ExactSizeIterator {}
16571657

1658-
#[stable(feature = "double_ended_skip_iterator", since = "1.8.0")]
1658+
#[stable(feature = "double_ended_skip_iterator", since = "1.9.0")]
16591659
impl<I> DoubleEndedIterator for Skip<I> where I: DoubleEndedIterator + ExactSizeIterator {
16601660
fn next_back(&mut self) -> Option<Self::Item> {
16611661
if self.len() > 0 {

src/libcore/num/mod.rs

Lines changed: 45 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -2682,8 +2682,8 @@ pub use num::dec2flt::ParseFloatError;
26822682
// Conversions T -> T are covered by a blanket impl and therefore excluded
26832683
// Some conversions from and to usize/isize are not implemented due to portability concerns
26842684
macro_rules! impl_from {
2685-
($Small: ty, $Large: ty) => {
2686-
#[stable(feature = "lossless_prim_conv", since = "1.5.0")]
2685+
($Small: ty, $Large: ty, #[$attr:meta]) => {
2686+
#[$attr]
26872687
impl From<$Small> for $Large {
26882688
#[inline]
26892689
fn from(small: $Small) -> $Large {
@@ -2694,60 +2694,60 @@ macro_rules! impl_from {
26942694
}
26952695

26962696
// Unsigned -> Unsigned
2697-
impl_from! { u8, u16 }
2698-
impl_from! { u8, u32 }
2699-
impl_from! { u8, u64 }
2700-
impl_from! { u8, u128 }
2701-
impl_from! { u8, usize }
2702-
impl_from! { u16, u32 }
2703-
impl_from! { u16, u64 }
2704-
impl_from! { u16, u128 }
2705-
impl_from! { u32, u64 }
2706-
impl_from! { u32, u128 }
2707-
impl_from! { u64, u128 }
2697+
impl_from! { u8, u16, #[stable(feature = "lossless_int_conv", since = "1.5.0")] }
2698+
impl_from! { u8, u32, #[stable(feature = "lossless_int_conv", since = "1.5.0")] }
2699+
impl_from! { u8, u64, #[stable(feature = "lossless_int_conv", since = "1.5.0")] }
2700+
impl_from! { u8, u128, #[unstable(feature = "i128", issue = "35118")] }
2701+
impl_from! { u8, usize, #[stable(feature = "lossless_int_conv", since = "1.5.0")] }
2702+
impl_from! { u16, u32, #[stable(feature = "lossless_int_conv", since = "1.5.0")] }
2703+
impl_from! { u16, u64, #[stable(feature = "lossless_int_conv", since = "1.5.0")] }
2704+
impl_from! { u16, u128, #[unstable(feature = "i128", issue = "35118")] }
2705+
impl_from! { u32, u64, #[stable(feature = "lossless_int_conv", since = "1.5.0")] }
2706+
impl_from! { u32, u128, #[unstable(feature = "i128", issue = "35118")] }
2707+
impl_from! { u64, u128, #[unstable(feature = "i128", issue = "35118")] }
27082708

27092709
// Signed -> Signed
2710-
impl_from! { i8, i16 }
2711-
impl_from! { i8, i32 }
2712-
impl_from! { i8, i64 }
2713-
impl_from! { i8, i128 }
2714-
impl_from! { i8, isize }
2715-
impl_from! { i16, i32 }
2716-
impl_from! { i16, i64 }
2717-
impl_from! { i16, i128 }
2718-
impl_from! { i32, i64 }
2719-
impl_from! { i32, i128 }
2720-
impl_from! { i64, i128 }
2710+
impl_from! { i8, i16, #[stable(feature = "lossless_int_conv", since = "1.5.0")] }
2711+
impl_from! { i8, i32, #[stable(feature = "lossless_int_conv", since = "1.5.0")] }
2712+
impl_from! { i8, i64, #[stable(feature = "lossless_int_conv", since = "1.5.0")] }
2713+
impl_from! { i8, i128, #[unstable(feature = "i128", issue = "35118")] }
2714+
impl_from! { i8, isize, #[stable(feature = "lossless_int_conv", since = "1.5.0")] }
2715+
impl_from! { i16, i32, #[stable(feature = "lossless_int_conv", since = "1.5.0")] }
2716+
impl_from! { i16, i64, #[stable(feature = "lossless_int_conv", since = "1.5.0")] }
2717+
impl_from! { i16, i128, #[unstable(feature = "i128", issue = "35118")] }
2718+
impl_from! { i32, i64, #[stable(feature = "lossless_int_conv", since = "1.5.0")] }
2719+
impl_from! { i32, i128, #[unstable(feature = "i128", issue = "35118")] }
2720+
impl_from! { i64, i128, #[unstable(feature = "i128", issue = "35118")] }
27212721

27222722
// Unsigned -> Signed
2723-
impl_from! { u8, i16 }
2724-
impl_from! { u8, i32 }
2725-
impl_from! { u8, i64 }
2726-
impl_from! { u8, i128 }
2727-
impl_from! { u16, i32 }
2728-
impl_from! { u16, i64 }
2729-
impl_from! { u16, i128 }
2730-
impl_from! { u32, i64 }
2731-
impl_from! { u32, i128 }
2732-
impl_from! { u64, i128 }
2723+
impl_from! { u8, i16, #[stable(feature = "lossless_int_conv", since = "1.5.0")] }
2724+
impl_from! { u8, i32, #[stable(feature = "lossless_int_conv", since = "1.5.0")] }
2725+
impl_from! { u8, i64, #[stable(feature = "lossless_int_conv", since = "1.5.0")] }
2726+
impl_from! { u8, i128, #[unstable(feature = "i128", issue = "35118")] }
2727+
impl_from! { u16, i32, #[stable(feature = "lossless_int_conv", since = "1.5.0")] }
2728+
impl_from! { u16, i64, #[stable(feature = "lossless_int_conv", since = "1.5.0")] }
2729+
impl_from! { u16, i128, #[unstable(feature = "i128", issue = "35118")] }
2730+
impl_from! { u32, i64, #[stable(feature = "lossless_int_conv", since = "1.5.0")] }
2731+
impl_from! { u32, i128, #[unstable(feature = "i128", issue = "35118")] }
2732+
impl_from! { u64, i128, #[unstable(feature = "i128", issue = "35118")] }
27332733

27342734
// Note: integers can only be represented with full precision in a float if
27352735
// they fit in the significand, which is 24 bits in f32 and 53 bits in f64.
27362736
// Lossy float conversions are not implemented at this time.
27372737

27382738
// Signed -> Float
2739-
impl_from! { i8, f32 }
2740-
impl_from! { i8, f64 }
2741-
impl_from! { i16, f32 }
2742-
impl_from! { i16, f64 }
2743-
impl_from! { i32, f64 }
2739+
impl_from! { i8, f32, #[stable(feature = "lossless_float_conv", since = "1.6.0")] }
2740+
impl_from! { i8, f64, #[stable(feature = "lossless_float_conv", since = "1.6.0")] }
2741+
impl_from! { i16, f32, #[stable(feature = "lossless_float_conv", since = "1.6.0")] }
2742+
impl_from! { i16, f64, #[stable(feature = "lossless_float_conv", since = "1.6.0")] }
2743+
impl_from! { i32, f64, #[stable(feature = "lossless_float_conv", since = "1.6.0")] }
27442744

27452745
// Unsigned -> Float
2746-
impl_from! { u8, f32 }
2747-
impl_from! { u8, f64 }
2748-
impl_from! { u16, f32 }
2749-
impl_from! { u16, f64 }
2750-
impl_from! { u32, f64 }
2746+
impl_from! { u8, f32, #[stable(feature = "lossless_float_conv", since = "1.6.0")] }
2747+
impl_from! { u8, f64, #[stable(feature = "lossless_float_conv", since = "1.6.0")] }
2748+
impl_from! { u16, f32, #[stable(feature = "lossless_float_conv", since = "1.6.0")] }
2749+
impl_from! { u16, f64, #[stable(feature = "lossless_float_conv", since = "1.6.0")] }
2750+
impl_from! { u32, f64, #[stable(feature = "lossless_float_conv", since = "1.6.0")] }
27512751

27522752
// Float -> Float
2753-
impl_from! { f32, f64 }
2753+
impl_from! { f32, f64, #[stable(feature = "lossless_float_conv", since = "1.6.0")] }

src/libcore/slice/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1450,7 +1450,7 @@ impl<'a, T> Clone for Iter<'a, T> {
14501450
fn clone(&self) -> Iter<'a, T> { Iter { ptr: self.ptr, end: self.end, _marker: self._marker } }
14511451
}
14521452

1453-
#[stable(feature = "slice_iter_as_ref", since = "1.12.0")]
1453+
#[stable(feature = "slice_iter_as_ref", since = "1.13.0")]
14541454
impl<'a, T> AsRef<[T]> for Iter<'a, T> {
14551455
fn as_ref(&self) -> &[T] {
14561456
self.as_slice()

src/libcore/str/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1597,7 +1597,7 @@ mod traits {
15971597
/// byte offset of a character (as defined by `is_char_boundary`).
15981598
/// Requires that `begin <= end` and `end <= len` where `len` is the
15991599
/// length of the string.
1600-
#[stable(feature = "derefmut_for_string", since = "1.2.0")]
1600+
#[stable(feature = "derefmut_for_string", since = "1.3.0")]
16011601
impl ops::IndexMut<ops::Range<usize>> for str {
16021602
#[inline]
16031603
fn index_mut(&mut self, index: ops::Range<usize>) -> &mut str {
@@ -1632,7 +1632,7 @@ mod traits {
16321632
/// `end`.
16331633
///
16341634
/// Equivalent to `&mut self[0 .. end]`.
1635-
#[stable(feature = "derefmut_for_string", since = "1.2.0")]
1635+
#[stable(feature = "derefmut_for_string", since = "1.3.0")]
16361636
impl ops::IndexMut<ops::RangeTo<usize>> for str {
16371637
#[inline]
16381638
fn index_mut(&mut self, index: ops::RangeTo<usize>) -> &mut str {
@@ -1672,7 +1672,7 @@ mod traits {
16721672
/// to the end of the string.
16731673
///
16741674
/// Equivalent to `&mut self[begin .. len]`.
1675-
#[stable(feature = "derefmut_for_string", since = "1.2.0")]
1675+
#[stable(feature = "derefmut_for_string", since = "1.3.0")]
16761676
impl ops::IndexMut<ops::RangeFrom<usize>> for str {
16771677
#[inline]
16781678
fn index_mut(&mut self, index: ops::RangeFrom<usize>) -> &mut str {
@@ -1708,7 +1708,7 @@ mod traits {
17081708
/// never panic.
17091709
///
17101710
/// Equivalent to `&mut self[0 .. len]`.
1711-
#[stable(feature = "derefmut_for_string", since = "1.2.0")]
1711+
#[stable(feature = "derefmut_for_string", since = "1.3.0")]
17121712
impl ops::IndexMut<ops::RangeFull> for str {
17131713
#[inline]
17141714
fn index_mut(&mut self, _index: ops::RangeFull) -> &mut str {

src/libstd/env.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -680,7 +680,7 @@ impl ExactSizeIterator for Args {
680680
fn is_empty(&self) -> bool { self.inner.is_empty() }
681681
}
682682

683-
#[stable(feature = "env_iterators", since = "1.11.0")]
683+
#[stable(feature = "env_iterators", since = "1.12.0")]
684684
impl DoubleEndedIterator for Args {
685685
fn next_back(&mut self) -> Option<String> {
686686
self.inner.next_back().map(|s| s.into_string().unwrap())
@@ -707,7 +707,7 @@ impl ExactSizeIterator for ArgsOs {
707707
fn is_empty(&self) -> bool { self.inner.is_empty() }
708708
}
709709

710-
#[stable(feature = "env_iterators", since = "1.11.0")]
710+
#[stable(feature = "env_iterators", since = "1.12.0")]
711711
impl DoubleEndedIterator for ArgsOs {
712712
fn next_back(&mut self) -> Option<OsString> { self.inner.next_back() }
713713
}

src/libstd/error.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ impl From<String> for Box<Error + Send + Sync> {
193193
}
194194
}
195195

196-
#[stable(feature = "string_box_error", since = "1.7.0")]
196+
#[stable(feature = "string_box_error", since = "1.6.0")]
197197
impl From<String> for Box<Error> {
198198
fn from(str_err: String) -> Box<Error> {
199199
let err1: Box<Error + Send + Sync> = From::from(str_err);
@@ -209,7 +209,7 @@ impl<'a, 'b> From<&'b str> for Box<Error + Send + Sync + 'a> {
209209
}
210210
}
211211

212-
#[stable(feature = "string_box_error", since = "1.7.0")]
212+
#[stable(feature = "string_box_error", since = "1.6.0")]
213213
impl<'a> From<&'a str> for Box<Error> {
214214
fn from(err: &'a str) -> Box<Error> {
215215
From::from(String::from(err))
@@ -282,7 +282,7 @@ impl Error for char::DecodeUtf16Error {
282282
}
283283
}
284284

285-
#[stable(feature = "box_error", since = "1.7.0")]
285+
#[stable(feature = "box_error", since = "1.8.0")]
286286
impl<T: Error> Error for Box<T> {
287287
fn description(&self) -> &str {
288288
Error::description(&**self)

src/libstd/ffi/c_str.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -419,14 +419,14 @@ impl<'a> From<&'a CStr> for Box<CStr> {
419419
}
420420
}
421421

422-
#[stable(feature = "c_string_from_box", since = "1.17.0")]
422+
#[stable(feature = "c_string_from_box", since = "1.18.0")]
423423
impl From<Box<CStr>> for CString {
424424
fn from(s: Box<CStr>) -> CString {
425425
s.into_c_string()
426426
}
427427
}
428428

429-
#[stable(feature = "box_from_c_string", since = "1.17.0")]
429+
#[stable(feature = "box_from_c_string", since = "1.18.0")]
430430
impl Into<Box<CStr>> for CString {
431431
fn into(self) -> Box<CStr> {
432432
self.into_boxed_c_str()

src/libstd/ffi/os_str.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -529,14 +529,14 @@ impl<'a> From<&'a OsStr> for Box<OsStr> {
529529
}
530530
}
531531

532-
#[stable(feature = "os_string_from_box", since = "1.17.0")]
532+
#[stable(feature = "os_string_from_box", since = "1.18.0")]
533533
impl<'a> From<Box<OsStr>> for OsString {
534534
fn from(boxed: Box<OsStr>) -> OsString {
535535
boxed.into_os_string()
536536
}
537537
}
538538

539-
#[stable(feature = "box_from_c_string", since = "1.17.0")]
539+
#[stable(feature = "box_from_os_string", since = "1.18.0")]
540540
impl Into<Box<OsStr>> for OsString {
541541
fn into(self) -> Box<OsStr> {
542542
self.into_boxed_os_str()

src/libstd/macros.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ macro_rules! println {
143143
///
144144
/// Panics if writing to `io::stderr` fails.
145145
#[macro_export]
146-
#[stable(feature = "eprint", since="1.18.0")]
146+
#[stable(feature = "eprint", since = "1.19.0")]
147147
#[allow_internal_unstable]
148148
macro_rules! eprint {
149149
($($arg:tt)*) => ($crate::io::_eprint(format_args!($($arg)*)));
@@ -162,7 +162,7 @@ macro_rules! eprint {
162162
///
163163
/// Panics if writing to `io::stderr` fails.
164164
#[macro_export]
165-
#[stable(feature = "eprint", since="1.18.0")]
165+
#[stable(feature = "eprint", since = "1.19.0")]
166166
macro_rules! eprintln {
167167
() => (eprint!("\n"));
168168
($fmt:expr) => (eprint!(concat!($fmt, "\n")));

0 commit comments

Comments
 (0)