Stabilize feature saturating_div for rust 1.58

This commit is contained in:
Michael Watzko 2021-10-21 18:08:03 +02:00
parent ce636f25e5
commit 0dba9d0e42
4 changed files with 4 additions and 15 deletions

View File

@ -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]

View File

@ -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);")]

View File

@ -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]

View File

@ -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)]