diff --git a/library/core/src/slice/mod.rs b/library/core/src/slice/mod.rs index c9b8231e856c1..1bf79a98ccac2 100644 --- a/library/core/src/slice/mod.rs +++ b/library/core/src/slice/mod.rs @@ -4738,8 +4738,6 @@ impl [T] { /// # Examples /// Basic usage: /// ``` - /// #![feature(substr_range)] - /// /// let nums: &[u32] = &[1, 7, 1, 1]; /// let num = &nums[2]; /// @@ -4748,8 +4746,6 @@ impl [T] { /// ``` /// Returning `None` with an unaligned element: /// ``` - /// #![feature(substr_range)] - /// /// let arr: &[[u32; 2]] = &[[0, 1], [2, 3]]; /// let flat_arr: &[u32] = arr.as_flattened(); /// @@ -4763,7 +4759,7 @@ impl [T] { /// assert_eq!(arr.element_offset(weird_elm), None); // Points between element 0 and 1 /// ``` #[must_use] - #[unstable(feature = "substr_range", issue = "126769")] + #[stable(feature = "substr_range", since = "CURRENT_RUSTC_VERSION")] pub fn element_offset(&self, element: &T) -> Option { if T::IS_ZST { panic!("elements are zero-sized"); @@ -4803,8 +4799,6 @@ impl [T] { /// # Examples /// Basic usage: /// ``` - /// #![feature(substr_range)] - /// /// let nums = &[0, 5, 10, 0, 0, 5]; /// /// let mut iter = nums @@ -4817,7 +4811,7 @@ impl [T] { /// assert_eq!(iter.next(), Some(5..6)); /// ``` #[must_use] - #[unstable(feature = "substr_range", issue = "126769")] + #[stable(feature = "substr_range", since = "CURRENT_RUSTC_VERSION")] pub fn subslice_range(&self, subslice: &[T]) -> Option> { if T::IS_ZST { panic!("elements are zero-sized"); diff --git a/library/core/src/str/mod.rs b/library/core/src/str/mod.rs index e505e2280953e..5e328cebd607d 100644 --- a/library/core/src/str/mod.rs +++ b/library/core/src/str/mod.rs @@ -2950,8 +2950,6 @@ impl str { /// /// # Examples /// ``` - /// #![feature(substr_range)] - /// /// let data = "a, b, b, a"; /// let mut iter = data.split(", ").map(|s| data.substr_range(s).unwrap()); /// @@ -2961,7 +2959,7 @@ impl str { /// assert_eq!(iter.next(), Some(9..10)); /// ``` #[must_use] - #[unstable(feature = "substr_range", issue = "126769")] + #[stable(feature = "substr_range", since = "CURRENT_RUSTC_VERSION")] pub fn substr_range(&self, substr: &str) -> Option> { self.as_bytes().subslice_range(substr.as_bytes()) }