#[doc = concat!("assert_eq!((1", stringify!($SelfT), ").checked_div(0), None);")]
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
- #[rustc_const_unstable(feature = "const_checked_int_methods", issue = "53718")]
+ #[rustc_const_stable(feature = "const_checked_int_methods", since = "1.52.0")]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[inline]
#[doc = concat!("assert_eq!((1", stringify!($SelfT), ").checked_div_euclid(0), None);")]
/// ```
#[stable(feature = "euclidean_division", since = "1.38.0")]
- #[rustc_const_unstable(feature = "const_euclidean_int_methods", issue = "53718")]
+ #[rustc_const_stable(feature = "const_euclidean_int_methods", since = "1.52.0")]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[inline]
#[doc = concat!("assert_eq!(", stringify!($SelfT), "::MIN.checked_rem(-1), None);")]
/// ```
#[stable(feature = "wrapping", since = "1.7.0")]
- #[rustc_const_unstable(feature = "const_checked_int_methods", issue = "53718")]
+ #[rustc_const_stable(feature = "const_checked_int_methods", since = "1.52.0")]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[inline]
#[doc = concat!("assert_eq!(", stringify!($SelfT), "::MIN.checked_rem_euclid(-1), None);")]
/// ```
#[stable(feature = "euclidean_division", since = "1.38.0")]
- #[rustc_const_unstable(feature = "const_euclidean_int_methods", issue = "53718")]
+ #[rustc_const_stable(feature = "const_euclidean_int_methods", since = "1.52.0")]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[inline]
/// assert_eq!((-128i8).wrapping_div(-1), -128);
/// ```
#[stable(feature = "num_wrapping", since = "1.2.0")]
- #[rustc_const_unstable(feature = "const_wrapping_int_methods", issue = "53718")]
+ #[rustc_const_stable(feature = "const_wrapping_int_methods", since = "1.52.0")]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[inline]
/// assert_eq!((-128i8).wrapping_div_euclid(-1), -128);
/// ```
#[stable(feature = "euclidean_division", since = "1.38.0")]
- #[rustc_const_unstable(feature = "const_euclidean_int_methods", issue = "53718")]
+ #[rustc_const_stable(feature = "const_euclidean_int_methods", since = "1.52.0")]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[inline]
/// assert_eq!((-128i8).wrapping_rem(-1), 0);
/// ```
#[stable(feature = "num_wrapping", since = "1.2.0")]
- #[rustc_const_unstable(feature = "const_wrapping_int_methods", issue = "53718")]
+ #[rustc_const_stable(feature = "const_wrapping_int_methods", since = "1.52.0")]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[inline]
/// assert_eq!((-128i8).wrapping_rem_euclid(-1), 0);
/// ```
#[stable(feature = "euclidean_division", since = "1.38.0")]
- #[rustc_const_unstable(feature = "const_euclidean_int_methods", issue = "53718")]
+ #[rustc_const_stable(feature = "const_euclidean_int_methods", since = "1.52.0")]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[inline]
///
/// Note that this is *not* the same as a rotate-left; the RHS of a wrapping shift-left is restricted to
/// the range of the type, rather than the bits shifted out of the LHS being returned to the other end.
- /// The primitive integer types all implement a [`rotate_left`](#method.rotate_left) function,
+ /// The primitive integer types all implement a [`rotate_left`](Self::rotate_left) function,
/// which may be what you want instead.
///
/// # Examples
///
/// Note that this is *not* the same as a rotate-right; the RHS of a wrapping shift-right is restricted
/// to the range of the type, rather than the bits shifted out of the LHS being returned to the other
- /// end. The primitive integer types all implement a [`rotate_right`](#method.rotate_right) function,
+ /// end. The primitive integer types all implement a [`rotate_right`](Self::rotate_right) function,
/// which may be what you want instead.
///
/// # Examples
/// ```
#[inline]
#[stable(feature = "wrapping", since = "1.7.0")]
- #[rustc_const_unstable(feature = "const_overflowing_int_methods", issue = "53718")]
+ #[rustc_const_stable(feature = "const_overflowing_int_methods", since = "1.52.0")]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
pub const fn overflowing_div(self, rhs: Self) -> (Self, bool) {
/// ```
#[inline]
#[stable(feature = "euclidean_division", since = "1.38.0")]
- #[rustc_const_unstable(feature = "const_euclidean_int_methods", issue = "53718")]
+ #[rustc_const_stable(feature = "const_euclidean_int_methods", since = "1.52.0")]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
pub const fn overflowing_div_euclid(self, rhs: Self) -> (Self, bool) {
/// ```
#[inline]
#[stable(feature = "wrapping", since = "1.7.0")]
- #[rustc_const_unstable(feature = "const_overflowing_int_methods", issue = "53718")]
+ #[rustc_const_stable(feature = "const_overflowing_int_methods", since = "1.52.0")]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
pub const fn overflowing_rem(self, rhs: Self) -> (Self, bool) {
#[doc = concat!("assert_eq!(", stringify!($SelfT), "::MIN.overflowing_rem_euclid(-1), (0, true));")]
/// ```
#[stable(feature = "euclidean_division", since = "1.38.0")]
- #[rustc_const_unstable(feature = "const_euclidean_int_methods", issue = "53718")]
+ #[rustc_const_stable(feature = "const_euclidean_int_methods", since = "1.52.0")]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[inline]
/// assert_eq!((-a).div_euclid(-b), 2); // -7 >= -4 * 2
/// ```
#[stable(feature = "euclidean_division", since = "1.38.0")]
- #[rustc_const_unstable(feature = "const_euclidean_int_methods", issue = "53718")]
+ #[rustc_const_stable(feature = "const_euclidean_int_methods", since = "1.52.0")]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[inline]
/// assert_eq!((-a).rem_euclid(-b), 1);
/// ```
#[stable(feature = "euclidean_division", since = "1.38.0")]
- #[rustc_const_unstable(feature = "const_euclidean_int_methods", issue = "53718")]
+ #[rustc_const_stable(feature = "const_euclidean_int_methods", since = "1.52.0")]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[inline]
///
#[doc = $to_xe_bytes_doc]
///
- /// [`to_be_bytes`]: #method.to_be_bytes
- /// [`to_le_bytes`]: #method.to_le_bytes
+ /// [`to_be_bytes`]: Self::to_be_bytes
+ /// [`to_le_bytes`]: Self::to_le_bytes
///
/// # Examples
///
///
/// [`to_ne_bytes`] should be preferred over this whenever possible.
///
- /// [`to_ne_bytes`]: #method.to_ne_bytes
+ /// [`to_ne_bytes`]: Self::to_ne_bytes
///
/// # Examples
///
/// likely wants to use [`from_be_bytes`] or [`from_le_bytes`], as
/// appropriate instead.
///
- /// [`from_be_bytes`]: #method.from_be_bytes
- /// [`from_le_bytes`]: #method.from_le_bytes
+ /// [`from_be_bytes`]: Self::from_be_bytes
+ /// [`from_le_bytes`]: Self::from_le_bytes
///
#[doc = $to_xe_bytes_doc]
///
}
/// New code should prefer to use
- #[doc = concat!("[`", stringify!($SelfT), "::MIN", "`](#associatedconstant.MIN).")]
+ #[doc = concat!("[`", stringify!($SelfT), "::MIN", "`] instead.")]
///
/// Returns the smallest value that can be represented by this integer type.
#[stable(feature = "rust1", since = "1.0.0")]
}
/// New code should prefer to use
- #[doc = concat!("[`", stringify!($SelfT), "::MAX", "`](#associatedconstant.MAX).")]
+ #[doc = concat!("[`", stringify!($SelfT), "::MAX", "`] instead.")]
///
/// Returns the largest value that can be represented by this integer type.
#[stable(feature = "rust1", since = "1.0.0")]