about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorkennytm <kennytm@gmail.com>2018-03-15 02:50:55 +0800
committerkennytm <kennytm@gmail.com>2018-03-15 17:01:30 +0800
commit939cfa251aeb34b4b1a11396af1a3396792c708d (patch)
tree2f2a356349d3d29945afef5b4f2c810860d09ebc /src/libcore
parent6399d16cfde37b06f6b82cdafa623e36385d7252 (diff)
downloadrust-939cfa251aeb34b4b1a11396af1a3396792c708d.tar.gz
rust-939cfa251aeb34b4b1a11396af1a3396792c708d.zip
Keep the fields of RangeInclusive unstable.
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/ops/range.rs6
-rw-r--r--src/libcore/tests/lib.rs1
2 files changed, 5 insertions, 2 deletions
diff --git a/src/libcore/ops/range.rs b/src/libcore/ops/range.rs
index 32aa6508805..be51f5239b0 100644
--- a/src/libcore/ops/range.rs
+++ b/src/libcore/ops/range.rs
@@ -283,6 +283,8 @@ impl<Idx: PartialOrd<Idx>> RangeTo<Idx> {
 /// # Examples
 ///
 /// ```
+/// #![feature(inclusive_range_fields)]
+///
 /// assert_eq!((3..=5), std::ops::RangeInclusive { start: 3, end: 5 });
 /// assert_eq!(3 + 4 + 5, (3..=5).sum());
 ///
@@ -294,10 +296,10 @@ impl<Idx: PartialOrd<Idx>> RangeTo<Idx> {
 #[stable(feature = "inclusive_range", since = "1.26.0")]
 pub struct RangeInclusive<Idx> {
     /// The lower bound of the range (inclusive).
-    #[stable(feature = "inclusive_range", since = "1.26.0")]
+    #[unstable(feature = "inclusive_range_fields", issue = "49022")]
     pub start: Idx,
     /// The upper bound of the range (inclusive).
-    #[stable(feature = "inclusive_range", since = "1.26.0")]
+    #[unstable(feature = "inclusive_range_fields", issue = "49022")]
     pub end: Idx,
 }
 
diff --git a/src/libcore/tests/lib.rs b/src/libcore/tests/lib.rs
index 85787f38f06..e53964b5769 100644
--- a/src/libcore/tests/lib.rs
+++ b/src/libcore/tests/lib.rs
@@ -47,6 +47,7 @@
 #![feature(exact_chunks)]
 #![feature(atomic_nand)]
 #![feature(reverse_bits)]
+#![feature(inclusive_range_fields)]
 
 extern crate core;
 extern crate test;