};
}
-#[cfg(bootstrap)]
-macro_rules! unlikely {
- ($e: expr) => {
- $e
- };
-}
-
-#[cfg(not(bootstrap))]
#[allow_internal_unstable(const_likely)]
macro_rules! unlikely {
($e: expr) => {
#[stable(feature = "no_panic_abs", since = "1.13.0")]
#[rustc_const_stable(feature = "const_int_methods", since = "1.32.0")]
#[allow(unused_attributes)]
- #[cfg_attr(bootstrap, allow_internal_unstable(const_if_match))]
#[inline]
pub const fn wrapping_abs(self) -> Self {
if self.is_negative() {
#[stable(feature = "wrapping", since = "1.7.0")]
#[rustc_const_stable(feature = "const_int_methods", since = "1.32.0")]
#[allow(unused_attributes)]
- #[cfg_attr(bootstrap, allow_internal_unstable(const_if_match))]
pub const fn overflowing_neg(self) -> (Self, bool) {
if unlikely!(self == Self::MIN) {
(Self::MIN, true)
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_stable(feature = "const_int_methods", since = "1.32.0")]
#[allow(unused_attributes)]
- #[cfg_attr(bootstrap, allow_internal_unstable(const_if_match))]
#[inline]
#[rustc_inherit_overflow_checks]
pub const fn abs(self) -> Self {