@@ -128,7 +128,7 @@ impl<Idx: PartialOrd<Idx>> Range<Idx> {
128128 /// The range is empty if either side is incomparable:
129129 ///
130130 /// ```
131- /// #![feature(range_is_empty,inclusive_range_syntax )]
131+ /// #![feature(range_is_empty)]
132132 ///
133133 /// use std::f32::NAN;
134134 /// assert!(!(3.0..5.0).is_empty());
@@ -283,7 +283,7 @@ impl<Idx: PartialOrd<Idx>> RangeTo<Idx> {
283283/// # Examples
284284///
285285/// ```
286- /// #![feature(inclusive_range,inclusive_range_syntax )]
286+ /// #![feature(inclusive_range_fields )]
287287///
288288/// assert_eq!((3..=5), std::ops::RangeInclusive { start: 3, end: 5 });
289289/// assert_eq!(3 + 4 + 5, (3..=5).sum());
@@ -293,21 +293,17 @@ impl<Idx: PartialOrd<Idx>> RangeTo<Idx> {
293293/// assert_eq!(arr[1..=2], [ 1,2 ]); // RangeInclusive
294294/// ```
295295#[ derive( Clone , PartialEq , Eq , Hash ) ] // not Copy -- see #27186
296- #[ unstable ( feature = "inclusive_range" , reason = "recently added, follows RFC" , issue = "28237 ") ]
296+ #[ stable ( feature = "inclusive_range" , since = "1.26.0 " ) ]
297297pub struct RangeInclusive < Idx > {
298298 /// The lower bound of the range (inclusive).
299- #[ unstable( feature = "inclusive_range" ,
300- reason = "recently added, follows RFC" ,
301- issue = "28237" ) ]
299+ #[ unstable( feature = "inclusive_range_fields" , issue = "49022" ) ]
302300 pub start : Idx ,
303301 /// The upper bound of the range (inclusive).
304- #[ unstable( feature = "inclusive_range" ,
305- reason = "recently added, follows RFC" ,
306- issue = "28237" ) ]
302+ #[ unstable( feature = "inclusive_range_fields" , issue = "49022" ) ]
307303 pub end : Idx ,
308304}
309305
310- #[ unstable ( feature = "inclusive_range" , reason = "recently added, follows RFC" , issue = "28237 ") ]
306+ #[ stable ( feature = "inclusive_range" , since = "1.26.0 " ) ]
311307impl < Idx : fmt:: Debug > fmt:: Debug for RangeInclusive < Idx > {
312308 fn fmt ( & self , fmt : & mut fmt:: Formatter ) -> fmt:: Result {
313309 write ! ( fmt, "{:?}..={:?}" , self . start, self . end)
@@ -320,7 +316,7 @@ impl<Idx: PartialOrd<Idx>> RangeInclusive<Idx> {
320316 /// # Examples
321317 ///
322318 /// ```
323- /// #![feature(range_contains,inclusive_range_syntax )]
319+ /// #![feature(range_contains)]
324320 ///
325321 /// assert!(!(3..=5).contains(2));
326322 /// assert!( (3..=5).contains(3));
@@ -341,7 +337,7 @@ impl<Idx: PartialOrd<Idx>> RangeInclusive<Idx> {
341337 /// # Examples
342338 ///
343339 /// ```
344- /// #![feature(range_is_empty,inclusive_range_syntax )]
340+ /// #![feature(range_is_empty)]
345341 ///
346342 /// assert!(!(3..=5).is_empty());
347343 /// assert!(!(3..=3).is_empty());
@@ -351,7 +347,7 @@ impl<Idx: PartialOrd<Idx>> RangeInclusive<Idx> {
351347 /// The range is empty if either side is incomparable:
352348 ///
353349 /// ```
354- /// #![feature(range_is_empty,inclusive_range_syntax )]
350+ /// #![feature(range_is_empty)]
355351 ///
356352 /// use std::f32::NAN;
357353 /// assert!(!(3.0..=5.0).is_empty());
@@ -362,7 +358,7 @@ impl<Idx: PartialOrd<Idx>> RangeInclusive<Idx> {
362358 /// This method returns `true` after iteration has finished:
363359 ///
364360 /// ```
365- /// #![feature(range_is_empty,inclusive_range_syntax )]
361+ /// #![feature(range_is_empty)]
366362 ///
367363 /// let mut r = 3..=5;
368364 /// for _ in r.by_ref() {}
@@ -385,16 +381,13 @@ impl<Idx: PartialOrd<Idx>> RangeInclusive<Idx> {
385381/// The `..=end` syntax is a `RangeToInclusive`:
386382///
387383/// ```
388- /// #![feature(inclusive_range,inclusive_range_syntax)]
389384/// assert_eq!((..=5), std::ops::RangeToInclusive{ end: 5 });
390385/// ```
391386///
392387/// It does not have an [`IntoIterator`] implementation, so you can't use it in a
393388/// `for` loop directly. This won't compile:
394389///
395390/// ```compile_fail,E0277
396- /// #![feature(inclusive_range_syntax)]
397- ///
398391/// // error[E0277]: the trait bound `std::ops::RangeToInclusive<{integer}>:
399392/// // std::iter::Iterator` is not satisfied
400393/// for i in ..=5 {
@@ -406,8 +399,6 @@ impl<Idx: PartialOrd<Idx>> RangeInclusive<Idx> {
406399/// array elements up to and including the index indicated by `end`.
407400///
408401/// ```
409- /// #![feature(inclusive_range_syntax)]
410- ///
411402/// let arr = [0, 1, 2, 3];
412403/// assert_eq!(arr[ ..=2], [0,1,2 ]); // RangeToInclusive
413404/// assert_eq!(arr[1..=2], [ 1,2 ]);
@@ -417,16 +408,14 @@ impl<Idx: PartialOrd<Idx>> RangeInclusive<Idx> {
417408/// [`Iterator`]: ../iter/trait.IntoIterator.html
418409/// [slicing index]: ../slice/trait.SliceIndex.html
419410#[ derive( Copy , Clone , PartialEq , Eq , Hash ) ]
420- #[ unstable ( feature = "inclusive_range" , reason = "recently added, follows RFC" , issue = "28237 ") ]
411+ #[ stable ( feature = "inclusive_range" , since = "1.26.0 " ) ]
421412pub struct RangeToInclusive < Idx > {
422413 /// The upper bound of the range (inclusive)
423- #[ unstable( feature = "inclusive_range" ,
424- reason = "recently added, follows RFC" ,
425- issue = "28237" ) ]
414+ #[ stable( feature = "inclusive_range" , since = "1.26.0" ) ]
426415 pub end : Idx ,
427416}
428417
429- #[ unstable ( feature = "inclusive_range" , reason = "recently added, follows RFC" , issue = "28237 ") ]
418+ #[ stable ( feature = "inclusive_range" , since = "1.26.0 " ) ]
430419impl < Idx : fmt:: Debug > fmt:: Debug for RangeToInclusive < Idx > {
431420 fn fmt ( & self , fmt : & mut fmt:: Formatter ) -> fmt:: Result {
432421 write ! ( fmt, "..={:?}" , self . end)
@@ -440,7 +429,7 @@ impl<Idx: PartialOrd<Idx>> RangeToInclusive<Idx> {
440429 /// # Examples
441430 ///
442431 /// ```
443- /// #![feature(range_contains,inclusive_range_syntax )]
432+ /// #![feature(range_contains)]
444433 ///
445434 /// assert!( (..=5).contains(-1_000_000_000));
446435 /// assert!( (..=5).contains(5));
0 commit comments