Skip to content

Commit bf86b32

Browse files
committed
Fix incorrect unsafe debug assertion in unchecked_div_exact
1 parent 4429659 commit bf86b32

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

library/core/src/num/int_macros.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1181,7 +1181,7 @@ macro_rules! int_impl {
11811181
(
11821182
lhs: $SelfT = self,
11831183
rhs: $SelfT = rhs,
1184-
) => rhs > 0 && lhs % rhs == 0 && (lhs != <$SelfT>::MIN || rhs != -1),
1184+
) => rhs != 0 && lhs % rhs == 0 && (lhs != <$SelfT>::MIN || rhs != -1),
11851185
);
11861186
// SAFETY: Same precondition
11871187
unsafe { intrinsics::exact_div(self, rhs) }

0 commit comments

Comments
 (0)