Skip to content

Commit 381d28f

Browse files
committed
stabilize collections_range (closes #30877)
1 parent 84bbd14 commit 381d28f

File tree

5 files changed

+7
-10
lines changed

5 files changed

+7
-10
lines changed

src/liballoc/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,6 @@ mod std {
204204
/// `Bound`s are range endpoints:
205205
///
206206
/// ```
207-
/// #![feature(collections_range)]
208-
///
209207
/// use std::collections::range::RangeArgument;
210208
/// use std::collections::Bound::*;
211209
///

src/liballoc/range.rs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#![unstable(feature = "collections_range",
12-
reason = "waiting for dust to settle on inclusive ranges",
13-
issue = "30877")]
1411

1512
//! Range syntax.
1613
@@ -19,6 +16,7 @@ use Bound::{self, Excluded, Included, Unbounded};
1916

2017
/// `RangeArgument` is implemented by Rust's built-in range types, produced
2118
/// by range syntax like `..`, `a..`, `..b` or `c..d`.
19+
#[stable(feature = "collections_range", since = "1.22.0")]
2220
pub trait RangeArgument<T: ?Sized> {
2321
/// Start index bound.
2422
///
@@ -28,7 +26,6 @@ pub trait RangeArgument<T: ?Sized> {
2826
///
2927
/// ```
3028
/// #![feature(alloc)]
31-
/// #![feature(collections_range)]
3229
///
3330
/// extern crate alloc;
3431
///
@@ -40,6 +37,7 @@ pub trait RangeArgument<T: ?Sized> {
4037
/// assert_eq!((3..10).start(), Included(&3));
4138
/// # }
4239
/// ```
40+
#[stable(feature = "collections_range", since = "1.22.0")]
4341
fn start(&self) -> Bound<&T>;
4442

4543
/// End index bound.
@@ -50,7 +48,6 @@ pub trait RangeArgument<T: ?Sized> {
5048
///
5149
/// ```
5250
/// #![feature(alloc)]
53-
/// #![feature(collections_range)]
5451
///
5552
/// extern crate alloc;
5653
///
@@ -62,11 +59,13 @@ pub trait RangeArgument<T: ?Sized> {
6259
/// assert_eq!((3..10).end(), Excluded(&10));
6360
/// # }
6461
/// ```
62+
#[stable(feature = "collections_range", since = "1.22.0")]
6563
fn end(&self) -> Bound<&T>;
6664
}
6765

6866
// FIXME add inclusive ranges to RangeArgument
6967

68+
#[stable(feature = "collections_range", since = "1.22.0")]
7069
impl<T: ?Sized> RangeArgument<T> for RangeFull {
7170
fn start(&self) -> Bound<&T> {
7271
Unbounded
@@ -76,6 +75,7 @@ impl<T: ?Sized> RangeArgument<T> for RangeFull {
7675
}
7776
}
7877

78+
#[stable(feature = "collections_range", since = "1.22.0")]
7979
impl<T> RangeArgument<T> for RangeFrom<T> {
8080
fn start(&self) -> Bound<&T> {
8181
Included(&self.start)
@@ -85,6 +85,7 @@ impl<T> RangeArgument<T> for RangeFrom<T> {
8585
}
8686
}
8787

88+
#[stable(feature = "collections_range", since = "1.22.0")]
8889
impl<T> RangeArgument<T> for RangeTo<T> {
8990
fn start(&self) -> Bound<&T> {
9091
Unbounded
@@ -94,6 +95,7 @@ impl<T> RangeArgument<T> for RangeTo<T> {
9495
}
9596
}
9697

98+
#[stable(feature = "collections_range", since = "1.22.0")]
9799
impl<T> RangeArgument<T> for Range<T> {
98100
fn start(&self) -> Bound<&T> {
99101
Included(&self.start)

src/libcollections/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
#![deny(warnings)]
2525

2626
#![feature(alloc)]
27-
#![feature(collections_range)]
2827
#![feature(macro_reexport)]
2928
#![feature(staged_api)]
3029

src/librustc_data_structures/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
#![deny(warnings)]
2323

2424
#![feature(shared)]
25-
#![feature(collections_range)]
2625
#![feature(nonzero)]
2726
#![feature(unboxed_closures)]
2827
#![feature(fn_traits)]

src/libstd/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,6 @@
249249
#![feature(cfg_target_vendor)]
250250
#![feature(char_error_internals)]
251251
#![feature(char_internals)]
252-
#![feature(collections_range)]
253252
#![feature(compiler_builtins_lib)]
254253
#![feature(const_fn)]
255254
#![feature(core_float)]

0 commit comments

Comments
 (0)