diff options
| author | kennytm <kennytm@gmail.com> | 2018-01-28 03:09:36 +0800 |
|---|---|---|
| committer | kennytm <kennytm@gmail.com> | 2018-03-15 16:58:01 +0800 |
| commit | b5913f2e7695ad247078619bf4c6a6d3dc4dece5 (patch) | |
| tree | 95642d12996af9c8beffd55721c629b5ab8fd5ff /src/liballoc | |
| parent | 5ebf74851d685f75abec7ef4e805f75fc301460c (diff) | |
| download | rust-b5913f2e7695ad247078619bf4c6a6d3dc4dece5.tar.gz rust-b5913f2e7695ad247078619bf4c6a6d3dc4dece5.zip | |
Stabilize `inclusive_range` library feature.
Stabilize std::ops::RangeInclusive and std::ops::RangeInclusiveTo.
Diffstat (limited to 'src/liballoc')
| -rw-r--r-- | src/liballoc/lib.rs | 1 | ||||
| -rw-r--r-- | src/liballoc/range.rs | 4 | ||||
| -rw-r--r-- | src/liballoc/string.rs | 8 |
3 files changed, 6 insertions, 7 deletions
diff --git a/src/liballoc/lib.rs b/src/liballoc/lib.rs index 3f306784558..cbfec554604 100644 --- a/src/liballoc/lib.rs +++ b/src/liballoc/lib.rs @@ -98,7 +98,6 @@ #![feature(fundamental)] #![feature(generic_param_attrs)] #![feature(i128_type)] -#![feature(inclusive_range)] #![feature(iter_rfold)] #![feature(lang_items)] #![feature(needs_allocator)] diff --git a/src/liballoc/range.rs b/src/liballoc/range.rs index f862da0d61e..b03abc85180 100644 --- a/src/liballoc/range.rs +++ b/src/liballoc/range.rs @@ -103,7 +103,7 @@ impl<T> RangeArgument<T> for Range<T> { } } -#[unstable(feature = "inclusive_range", reason = "recently added, follows RFC", issue = "28237")] +#[stable(feature = "inclusive_range", since = "1.26.0")] impl<T> RangeArgument<T> for RangeInclusive<T> { fn start(&self) -> Bound<&T> { Included(&self.start) @@ -113,7 +113,7 @@ impl<T> RangeArgument<T> for RangeInclusive<T> { } } -#[unstable(feature = "inclusive_range", reason = "recently added, follows RFC", issue = "28237")] +#[stable(feature = "inclusive_range", since = "1.26.0")] impl<T> RangeArgument<T> for RangeToInclusive<T> { fn start(&self) -> Bound<&T> { Unbounded diff --git a/src/liballoc/string.rs b/src/liballoc/string.rs index 370fb6b4e89..185fb61ae9e 100644 --- a/src/liballoc/string.rs +++ b/src/liballoc/string.rs @@ -1876,7 +1876,7 @@ impl ops::Index<ops::RangeFull> for String { unsafe { str::from_utf8_unchecked(&self.vec) } } } -#[unstable(feature = "inclusive_range", reason = "recently added, follows RFC", issue = "28237")] +#[stable(feature = "inclusive_range", since = "1.26.0")] impl ops::Index<ops::RangeInclusive<usize>> for String { type Output = str; @@ -1885,7 +1885,7 @@ impl ops::Index<ops::RangeInclusive<usize>> for String { Index::index(&**self, index) } } -#[unstable(feature = "inclusive_range", reason = "recently added, follows RFC", issue = "28237")] +#[stable(feature = "inclusive_range", since = "1.26.0")] impl ops::Index<ops::RangeToInclusive<usize>> for String { type Output = str; @@ -1923,14 +1923,14 @@ impl ops::IndexMut<ops::RangeFull> for String { unsafe { str::from_utf8_unchecked_mut(&mut *self.vec) } } } -#[unstable(feature = "inclusive_range", reason = "recently added, follows RFC", issue = "28237")] +#[stable(feature = "inclusive_range", since = "1.26.0")] impl ops::IndexMut<ops::RangeInclusive<usize>> for String { #[inline] fn index_mut(&mut self, index: ops::RangeInclusive<usize>) -> &mut str { IndexMut::index_mut(&mut **self, index) } } -#[unstable(feature = "inclusive_range", reason = "recently added, follows RFC", issue = "28237")] +#[stable(feature = "inclusive_range", since = "1.26.0")] impl ops::IndexMut<ops::RangeToInclusive<usize>> for String { #[inline] fn index_mut(&mut self, index: ops::RangeToInclusive<usize>) -> &mut str { |
