@@ -318,8 +318,6 @@ impl<Idx: PartialOrd<Idx>> RangeTo<Idx> {
318318/// # Examples
319319///
320320/// ```
321- /// #![feature(inclusive_range_methods)]
322- ///
323321/// assert_eq!((3..=5), std::ops::RangeInclusive::new(3, 5));
324322/// assert_eq!(3 + 4 + 5, (3..=5).sum());
325323///
@@ -355,12 +353,11 @@ impl<Idx> RangeInclusive<Idx> {
355353 /// # Examples
356354 ///
357355 /// ```
358- /// #![feature(inclusive_range_methods)]
359356 /// use std::ops::RangeInclusive;
360357 ///
361358 /// assert_eq!(3..=5, RangeInclusive::new(3, 5));
362359 /// ```
363- #[ unstable ( feature = "inclusive_range_methods" , issue = "49022 " ) ]
360+ #[ stable ( feature = "inclusive_range_methods" , since = "1.27.0 " ) ]
364361 #[ inline]
365362 pub const fn new ( start : Idx , end : Idx ) -> Self {
366363 Self { start, end }
@@ -373,17 +370,18 @@ impl<Idx> RangeInclusive<Idx> {
373370 /// whether the inclusive range is empty, use the [`is_empty()`] method
374371 /// instead of comparing `start() > end()`.
375372 ///
373+ /// Note: the value returned by this method is unspecified after the range
374+ /// has been iterated to exhaustion.
375+ ///
376376 /// [`end()`]: #method.end
377377 /// [`is_empty()`]: #method.is_empty
378378 ///
379379 /// # Examples
380380 ///
381381 /// ```
382- /// #![feature(inclusive_range_methods)]
383- ///
384382 /// assert_eq!((3..=5).start(), &3);
385383 /// ```
386- #[ unstable ( feature = "inclusive_range_methods" , issue = "49022 " ) ]
384+ #[ stable ( feature = "inclusive_range_methods" , since = "1.27.0 " ) ]
387385 #[ inline]
388386 pub fn start ( & self ) -> & Idx {
389387 & self . start
@@ -396,21 +394,38 @@ impl<Idx> RangeInclusive<Idx> {
396394 /// whether the inclusive range is empty, use the [`is_empty()`] method
397395 /// instead of comparing `start() > end()`.
398396 ///
397+ /// Note: the value returned by this method is unspecified after the range
398+ /// has been iterated to exhaustion.
399+ ///
399400 /// [`start()`]: #method.start
400401 /// [`is_empty()`]: #method.is_empty
401402 ///
402403 /// # Examples
403404 ///
404405 /// ```
405- /// #![feature(inclusive_range_methods)]
406- ///
407406 /// assert_eq!((3..=5).end(), &5);
408407 /// ```
409- #[ unstable ( feature = "inclusive_range_methods" , issue = "49022 " ) ]
408+ #[ stable ( feature = "inclusive_range_methods" , since = "1.27.0 " ) ]
410409 #[ inline]
411410 pub fn end ( & self ) -> & Idx {
412411 & self . end
413412 }
413+
414+ /// Destructures the `RangeInclusive` into (lower bound, upper (inclusive) bound).
415+ ///
416+ /// Note: the value returned by this method is unspecified after the range
417+ /// has been iterated to exhaustion.
418+ ///
419+ /// # Examples
420+ ///
421+ /// ```
422+ /// assert_eq!((3..=5).into_inner(), (3, 5));
423+ /// ```
424+ #[ stable( feature = "inclusive_range_methods" , since = "1.27.0" ) ]
425+ #[ inline]
426+ pub fn into_inner ( self ) -> ( Idx , Idx ) {
427+ ( self . start , self . end )
428+ }
414429}
415430
416431#[ stable( feature = "inclusive_range" , since = "1.26.0" ) ]
0 commit comments