Clean up const-hack from #58044

This commit is contained in:
jumbatm
2019-12-27 20:29:39 +10:00
parent 282635f2db
commit 91c2f78b50
+6 -1
View File
@@ -1709,8 +1709,13 @@ pub fn overflowing_rem_euclid(self, rhs: Self) -> (Self, bool) {
#[inline]
#[stable(feature = "wrapping", since = "1.7.0")]
#[rustc_const_stable(feature = "const_int_methods", since = "1.32.0")]
#[allow_internal_unstable(const_if_match)]
pub const fn overflowing_neg(self) -> (Self, bool) {
((!self).wrapping_add(1), self == Self::min_value())
if self == Self::min_value() {
(Self::min_value(), true)
} else {
(-self, false)
}
}
}