Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 4 additions & 12 deletions library/core/src/num/nonzero.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1147,12 +1147,10 @@ macro_rules! nonzero_min_max_unsigned {
/// # Examples
///
/// ```
/// #![feature(nonzero_min_max)]
///
#[doc = concat!("# use std::num::", stringify!($Ty), ";")]
#[doc = concat!("assert_eq!(", stringify!($Ty), "::MIN.get(), 1", stringify!($Int), ");")]
/// ```
#[unstable(feature = "nonzero_min_max", issue = "89065")]
#[stable(feature = "nonzero_min_max", since = "CURRENT_RUSTC_VERSION")]
pub const MIN: Self = Self::new(1).unwrap();

/// The largest value that can be represented by this non-zero
Expand All @@ -1162,12 +1160,10 @@ macro_rules! nonzero_min_max_unsigned {
/// # Examples
///
/// ```
/// #![feature(nonzero_min_max)]
///
#[doc = concat!("# use std::num::", stringify!($Ty), ";")]
#[doc = concat!("assert_eq!(", stringify!($Ty), "::MAX.get(), ", stringify!($Int), "::MAX);")]
/// ```
#[unstable(feature = "nonzero_min_max", issue = "89065")]
#[stable(feature = "nonzero_min_max", since = "CURRENT_RUSTC_VERSION")]
pub const MAX: Self = Self::new(<$Int>::MAX).unwrap();
}
)+
Expand All @@ -1189,12 +1185,10 @@ macro_rules! nonzero_min_max_signed {
/// # Examples
///
/// ```
/// #![feature(nonzero_min_max)]
///
#[doc = concat!("# use std::num::", stringify!($Ty), ";")]
#[doc = concat!("assert_eq!(", stringify!($Ty), "::MIN.get(), ", stringify!($Int), "::MIN);")]
/// ```
#[unstable(feature = "nonzero_min_max", issue = "89065")]
#[stable(feature = "nonzero_min_max", since = "CURRENT_RUSTC_VERSION")]
pub const MIN: Self = Self::new(<$Int>::MIN).unwrap();

/// The largest value that can be represented by this non-zero
Expand All @@ -1208,12 +1202,10 @@ macro_rules! nonzero_min_max_signed {
/// # Examples
///
/// ```
/// #![feature(nonzero_min_max)]
///
#[doc = concat!("# use std::num::", stringify!($Ty), ";")]
#[doc = concat!("assert_eq!(", stringify!($Ty), "::MAX.get(), ", stringify!($Int), "::MAX);")]
/// ```
#[unstable(feature = "nonzero_min_max", issue = "89065")]
#[stable(feature = "nonzero_min_max", since = "CURRENT_RUSTC_VERSION")]
pub const MAX: Self = Self::new(<$Int>::MAX).unwrap();
}
)+
Expand Down