]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #50758 - varkor:stabilise-inclusive_range_methods, r=SimonSapin
authorbors <bors@rust-lang.org>
Fri, 18 May 2018 08:10:23 +0000 (08:10 +0000)
committerbors <bors@rust-lang.org>
Fri, 18 May 2018 08:10:23 +0000 (08:10 +0000)
Stabilise inclusive_range_methods

r? @SimonSapin

Closes #49022.

src/liballoc/tests/lib.rs
src/libcore/ops/range.rs
src/libcore/tests/lib.rs
src/librustc/lib.rs
src/librustc_codegen_llvm/lib.rs
src/librustc_mir/lib.rs
src/librustc_target/lib.rs

index 1c8ff316e55aab6fdaf4aae5ff8872ad835c9f5d..081c473768f1fe4666fdeb42e230fd1284629d54 100644 (file)
@@ -25,7 +25,6 @@
 #![feature(try_reserve)]
 #![feature(unboxed_closures)]
 #![feature(exact_chunks)]
-#![feature(inclusive_range_methods)]
 
 extern crate alloc_system;
 extern crate core;
index 1f84631ada3a10caa5602c5b95b2e8f16d21046e..7c6e2447bdb7f39b707c1c80e62f6420ca0d7e5b 100644 (file)
@@ -318,8 +318,6 @@ pub fn contains<U>(&self, item: &U) -> bool
 /// # Examples
 ///
 /// ```
-/// #![feature(inclusive_range_methods)]
-///
 /// assert_eq!((3..=5), std::ops::RangeInclusive::new(3, 5));
 /// assert_eq!(3 + 4 + 5, (3..=5).sum());
 ///
@@ -345,12 +343,11 @@ impl<Idx> RangeInclusive<Idx> {
     /// # Examples
     ///
     /// ```
-    /// #![feature(inclusive_range_methods)]
     /// use std::ops::RangeInclusive;
     ///
     /// assert_eq!(3..=5, RangeInclusive::new(3, 5));
     /// ```
-    #[unstable(feature = "inclusive_range_methods", issue = "49022")]
+    #[stable(feature = "inclusive_range_methods", since = "1.27.0")]
     #[inline]
     pub const fn new(start: Idx, end: Idx) -> Self {
         Self { start, end }
@@ -363,17 +360,18 @@ pub const fn new(start: Idx, end: Idx) -> Self {
     /// whether the inclusive range is empty, use the [`is_empty()`] method
     /// instead of comparing `start() > end()`.
     ///
+    /// Note: the value returned by this method is unspecified after the range
+    /// has been iterated to exhaustion.
+    ///
     /// [`end()`]: #method.end
     /// [`is_empty()`]: #method.is_empty
     ///
     /// # Examples
     ///
     /// ```
-    /// #![feature(inclusive_range_methods)]
-    ///
     /// assert_eq!((3..=5).start(), &3);
     /// ```
-    #[unstable(feature = "inclusive_range_methods", issue = "49022")]
+    #[stable(feature = "inclusive_range_methods", since = "1.27.0")]
     #[inline]
     pub fn start(&self) -> &Idx {
         &self.start
@@ -386,32 +384,34 @@ pub fn start(&self) -> &Idx {
     /// whether the inclusive range is empty, use the [`is_empty()`] method
     /// instead of comparing `start() > end()`.
     ///
+    /// Note: the value returned by this method is unspecified after the range
+    /// has been iterated to exhaustion.
+    ///
     /// [`start()`]: #method.start
     /// [`is_empty()`]: #method.is_empty
     ///
     /// # Examples
     ///
     /// ```
-    /// #![feature(inclusive_range_methods)]
-    ///
     /// assert_eq!((3..=5).end(), &5);
     /// ```
-    #[unstable(feature = "inclusive_range_methods", issue = "49022")]
+    #[stable(feature = "inclusive_range_methods", since = "1.27.0")]
     #[inline]
     pub fn end(&self) -> &Idx {
         &self.end
     }
 
-    /// Destructures the RangeInclusive into (lower bound, upper (inclusive) bound).
+    /// Destructures the `RangeInclusive` into (lower bound, upper (inclusive) bound).
+    ///
+    /// Note: the value returned by this method is unspecified after the range
+    /// has been iterated to exhaustion.
     ///
     /// # Examples
     ///
     /// ```
-    /// #![feature(inclusive_range_methods)]
-    ///
     /// assert_eq!((3..=5).into_inner(), (3, 5));
     /// ```
-    #[unstable(feature = "inclusive_range_methods", issue = "49022")]
+    #[stable(feature = "inclusive_range_methods", since = "1.27.0")]
     #[inline]
     pub fn into_inner(self) -> (Idx, Idx) {
         (self.start, self.end)
index 8c481338945ff870d12b087ff2bf39f5626e848f..cd6b5c6a4ad4cf43c78d9573c2a9e7e33b51ba66 100644 (file)
@@ -42,7 +42,6 @@
 #![feature(try_trait)]
 #![feature(exact_chunks)]
 #![feature(reverse_bits)]
-#![feature(inclusive_range_methods)]
 #![feature(iterator_find_map)]
 #![feature(slice_internals)]
 
index bbd684982fa41133e2e5db23a9859860b82122af..1d53a305193fae50cb8e05d735b4985076ce3fd9 100644 (file)
@@ -68,7 +68,6 @@
 #![feature(trusted_len)]
 #![feature(catch_expr)]
 #![feature(test)]
-#![feature(inclusive_range_methods)]
 
 #![recursion_limit="512"]
 
index bd053da4bd3034ddade089159bc57511c6d8d794..0b0bab96dfdfd94f018ed1c22088046305524a13 100644 (file)
@@ -29,7 +29,6 @@
 #![feature(rustc_diagnostic_macros)]
 #![feature(slice_sort_by_cached_key)]
 #![feature(optin_builtin_traits)]
-#![feature(inclusive_range_methods)]
 
 use rustc::dep_graph::WorkProduct;
 use syntax_pos::symbol::Symbol;
index d9b6c406e2012367464b67d99ab0db59ddc56bbe..3bf9453fb513c82a5d2a69f2caa9620cce8ed4bd 100644 (file)
@@ -29,7 +29,6 @@
 #![feature(exhaustive_patterns)]
 #![feature(range_contains)]
 #![feature(rustc_diagnostic_macros)]
-#![feature(inclusive_range_methods)]
 #![feature(crate_visibility_modifier)]
 #![feature(never_type)]
 #![feature(specialization)]
index 45f2ee13bbdc94e29f5e5922564f24314351d1ff..8f4911574398ba84d2f6874f334e371d8e93666f 100644 (file)
@@ -29,7 +29,6 @@
 #![feature(const_fn)]
 #![feature(fs_read_write)]
 #![feature(inclusive_range)]
-#![feature(inclusive_range_methods)]
 #![feature(slice_patterns)]
 
 #[macro_use]