Skip to content

Commit 272e77f

Browse files
committed
Auto merge of #42111 - ollie27:stab, r=Mark-Simulacrum
Correct some stability versions These were found by running tidy on stable versions of rust and finding features stabilised with the wrong version numbers.
2 parents a0da1e0 + 2f703e4 commit 272e77f

File tree

20 files changed

+98
-98
lines changed

20 files changed

+98
-98
lines changed

src/liballoc/boxed.rs

+1-1
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

+7-7
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

+5-5
Original file line numberDiff line numberDiff line change
@@ -2096,7 +2096,7 @@ impl<'a, T: Clone> From<&'a [T]> for Vec<T> {
20962096
}
20972097
}
20982098

2099-
#[stable(feature = "vec_from_mut", since = "1.21.0")]
2099+
#[stable(feature = "vec_from_mut", since = "1.19.0")]
21002100
impl<'a, T: Clone> From<&'a mut [T]> for Vec<T> {
21012101
#[cfg(not(test))]
21022102
fn from(s: &'a mut [T]) -> Vec<T> {
@@ -2117,14 +2117,14 @@ impl<'a, T> From<Cow<'a, [T]>> for Vec<T> where [T]: ToOwned<Owned=Vec<T>> {
21172117

21182118
// note: test pulls in libstd, which causes errors here
21192119
#[cfg(not(test))]
2120-
#[stable(feature = "vec_from_box", since = "1.17.0")]
2120+
#[stable(feature = "vec_from_box", since = "1.18.0")]
21212121
impl<T> From<Box<[T]>> for Vec<T> {
21222122
fn from(s: Box<[T]>) -> Vec<T> {
21232123
s.into_vec()
21242124
}
21252125
}
21262126

2127-
#[stable(feature = "box_from_vec", since = "1.17.0")]
2127+
#[stable(feature = "box_from_vec", since = "1.18.0")]
21282128
impl<T> Into<Box<[T]>> for Vec<T> {
21292129
fn into(self) -> Box<[T]> {
21302130
self.into_boxed_slice()
@@ -2142,14 +2142,14 @@ impl<'a> From<&'a str> for Vec<u8> {
21422142
// Clone-on-write
21432143
////////////////////////////////////////////////////////////////////////////////
21442144

2145-
#[stable(feature = "cow_from_vec", since = "1.7.0")]
2145+
#[stable(feature = "cow_from_vec", since = "1.8.0")]
21462146
impl<'a, T: Clone> From<&'a [T]> for Cow<'a, [T]> {
21472147
fn from(s: &'a [T]) -> Cow<'a, [T]> {
21482148
Cow::Borrowed(s)
21492149
}
21502150
}
21512151

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

src/libcore/cell.rs

+1-1
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

+1-1
Original file line numberDiff line numberDiff line change
@@ -1690,7 +1690,7 @@ impl<I> Iterator for Skip<I> where I: Iterator {
16901690
#[stable(feature = "rust1", since = "1.0.0")]
16911691
impl<I> ExactSizeIterator for Skip<I> where I: ExactSizeIterator {}
16921692

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

src/libcore/num/mod.rs

+45-45
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

+1-1
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

+4-4
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

+2-2
Original file line numberDiff line numberDiff line change
@@ -683,7 +683,7 @@ impl ExactSizeIterator for Args {
683683
fn is_empty(&self) -> bool { self.inner.is_empty() }
684684
}
685685

686-
#[stable(feature = "env_iterators", since = "1.11.0")]
686+
#[stable(feature = "env_iterators", since = "1.12.0")]
687687
impl DoubleEndedIterator for Args {
688688
fn next_back(&mut self) -> Option<String> {
689689
self.inner.next_back().map(|s| s.into_string().unwrap())
@@ -710,7 +710,7 @@ impl ExactSizeIterator for ArgsOs {
710710
fn is_empty(&self) -> bool { self.inner.is_empty() }
711711
}
712712

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

src/libstd/error.rs

+3-3
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

+2-2
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

+2-2
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

+2-2
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)