diff --git a/library/core/src/num/int_macros.rs b/library/core/src/num/int_macros.rs index 5ef2558a5fe..22d36d4eba3 100644 --- a/library/core/src/num/int_macros.rs +++ b/library/core/src/num/int_macros.rs @@ -608,8 +608,7 @@ pub const fn checked_mul(self, rhs: Self) -> Option { without modifying the original"] #[inline] pub const fn checked_div(self, rhs: Self) -> Option { - // Using `&` helps LLVM see that it is the same check made in division. - if unlikely!(rhs == 0 || ((self == Self::MIN) & (rhs == -1))) { + if unlikely!(rhs == 0 || ((self == Self::MIN) && (rhs == -1))) { None } else { // SAFETY: div by zero and by INT_MIN have been checked above