@@ -125,8 +125,6 @@ impl<Idx: PartialOrd<Idx>> Range<Idx> {
125
125
/// # Examples
126
126
///
127
127
/// ```
128
- /// #![feature(range_is_empty)]
129
- ///
130
128
/// assert!(!(3..5).is_empty());
131
129
/// assert!( (3..3).is_empty());
132
130
/// assert!( (3..2).is_empty());
@@ -135,13 +133,11 @@ impl<Idx: PartialOrd<Idx>> Range<Idx> {
135
133
/// The range is empty if either side is incomparable:
136
134
///
137
135
/// ```
138
- /// #![feature(range_is_empty)]
139
- ///
140
136
/// assert!(!(3.0..5.0).is_empty());
141
137
/// assert!( (3.0..f32::NAN).is_empty());
142
138
/// assert!( (f32::NAN..5.0).is_empty());
143
139
/// ```
144
- #[ unstable ( feature = "range_is_empty" , reason = "recently added" , issue = "48111 ") ]
140
+ #[ stable ( feature = "range_is_empty" , since = "1.47.0 " ) ]
145
141
pub fn is_empty ( & self ) -> bool {
146
142
!( self . start < self . end )
147
143
}
@@ -481,8 +477,6 @@ impl<Idx: PartialOrd<Idx>> RangeInclusive<Idx> {
481
477
/// # Examples
482
478
///
483
479
/// ```
484
- /// #![feature(range_is_empty)]
485
- ///
486
480
/// assert!(!(3..=5).is_empty());
487
481
/// assert!(!(3..=3).is_empty());
488
482
/// assert!( (3..=2).is_empty());
@@ -491,8 +485,6 @@ impl<Idx: PartialOrd<Idx>> RangeInclusive<Idx> {
491
485
/// The range is empty if either side is incomparable:
492
486
///
493
487
/// ```
494
- /// #![feature(range_is_empty)]
495
- ///
496
488
/// assert!(!(3.0..=5.0).is_empty());
497
489
/// assert!( (3.0..=f32::NAN).is_empty());
498
490
/// assert!( (f32::NAN..=5.0).is_empty());
@@ -501,14 +493,12 @@ impl<Idx: PartialOrd<Idx>> RangeInclusive<Idx> {
501
493
/// This method returns `true` after iteration has finished:
502
494
///
503
495
/// ```
504
- /// #![feature(range_is_empty)]
505
- ///
506
496
/// let mut r = 3..=5;
507
497
/// for _ in r.by_ref() {}
508
498
/// // Precise field values are unspecified here
509
499
/// assert!(r.is_empty());
510
500
/// ```
511
- #[ unstable ( feature = "range_is_empty" , reason = "recently added" , issue = "48111 ") ]
501
+ #[ stable ( feature = "range_is_empty" , since = "1.47.0 " ) ]
512
502
#[ inline]
513
503
pub fn is_empty ( & self ) -> bool {
514
504
self . exhausted || !( self . start <= self . end )
0 commit comments