From 0dba9d0e424eeded14f891eb3e01575fcb9e580a Mon Sep 17 00:00:00 2001 From: Michael Watzko Date: Thu, 21 Oct 2021 18:08:03 +0200 Subject: [PATCH] Stabilize feature saturating_div for rust 1.58 --- library/core/src/num/int_macros.rs | 7 +------ library/core/src/num/saturating.rs | 4 ++-- library/core/src/num/uint_macros.rs | 7 +------ library/std/src/lib.rs | 1 - 4 files changed, 4 insertions(+), 15 deletions(-) diff --git a/library/core/src/num/int_macros.rs b/library/core/src/num/int_macros.rs index 2c866812937e9..020a3360d5f65 100644 --- a/library/core/src/num/int_macros.rs +++ b/library/core/src/num/int_macros.rs @@ -926,8 +926,6 @@ macro_rules! int_impl { /// Basic usage: /// /// ``` - /// #![feature(saturating_div)] - /// #[doc = concat!("assert_eq!(5", stringify!($SelfT), ".saturating_div(2), 2);")] #[doc = concat!("assert_eq!(", stringify!($SelfT), "::MAX.saturating_div(-1), ", stringify!($SelfT), "::MIN + 1);")] #[doc = concat!("assert_eq!(", stringify!($SelfT), "::MIN.saturating_div(-1), ", stringify!($SelfT), "::MAX);")] @@ -935,13 +933,10 @@ macro_rules! int_impl { /// ``` /// /// ```should_panic - /// #![feature(saturating_div)] - /// #[doc = concat!("let _ = 1", stringify!($SelfT), ".saturating_div(0);")] /// /// ``` - #[unstable(feature = "saturating_div", issue = "87920")] - #[rustc_const_unstable(feature = "saturating_div", issue = "87920")] + #[stable(feature = "saturating_div", since = "1.58.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline] diff --git a/library/core/src/num/saturating.rs b/library/core/src/num/saturating.rs index f6dd3603c4914..c8d730700b518 100644 --- a/library/core/src/num/saturating.rs +++ b/library/core/src/num/saturating.rs @@ -273,7 +273,7 @@ macro_rules! saturating_impl { /// Basic usage: /// /// ``` - /// #![feature(saturating_int_impl, saturating_div)] + /// #![feature(saturating_int_impl)] /// use std::num::Saturating; /// #[doc = concat!("assert_eq!(Saturating(2", stringify!($t), "), Saturating(5", stringify!($t), ") / Saturating(2));")] @@ -282,7 +282,7 @@ macro_rules! saturating_impl { /// ``` /// /// ```should_panic - /// #![feature(saturating_int_impl, saturating_div)] + /// #![feature(saturating_int_impl)] /// use std::num::Saturating; /// #[doc = concat!("let _ = Saturating(0", stringify!($t), ") / Saturating(0);")] diff --git a/library/core/src/num/uint_macros.rs b/library/core/src/num/uint_macros.rs index d6bd3115a0254..ae8c22585b95e 100644 --- a/library/core/src/num/uint_macros.rs +++ b/library/core/src/num/uint_macros.rs @@ -1049,20 +1049,15 @@ macro_rules! uint_impl { /// Basic usage: /// /// ``` - /// #![feature(saturating_div)] - /// #[doc = concat!("assert_eq!(5", stringify!($SelfT), ".saturating_div(2), 2);")] /// /// ``` /// /// ```should_panic - /// #![feature(saturating_div)] - /// #[doc = concat!("let _ = 1", stringify!($SelfT), ".saturating_div(0);")] /// /// ``` - #[unstable(feature = "saturating_div", issue = "87920")] - #[rustc_const_unstable(feature = "saturating_div", issue = "87920")] + #[stable(feature = "saturating_div", since = "1.58.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline] diff --git a/library/std/src/lib.rs b/library/std/src/lib.rs index 676ca5dea5d26..818ca7df3e37a 100644 --- a/library/std/src/lib.rs +++ b/library/std/src/lib.rs @@ -308,7 +308,6 @@ #![feature(ptr_internals)] #![feature(rustc_attrs)] #![feature(rustc_private)] -#![feature(saturating_div)] #![feature(saturating_int_impl)] #![feature(slice_concat_ext)] #![feature(slice_internals)]