Skip to content

Commit d8122ee

Browse files
committed
Fix bug in wrapping_div
See discussion, albeit one-sided, in: rust-lang/rfcs#964
1 parent 4991c7a commit d8122ee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/libcore/num/wrapping.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ macro_rules! signed_overflowing_impl {
232232
#[inline(always)]
233233
fn overflowing_div(self, rhs: $t) -> ($t, bool) {
234234
if self == $t::MIN && rhs == -1 {
235-
(1, true)
235+
(self, true)
236236
} else {
237237
(self/rhs, false)
238238
}

0 commit comments

Comments
 (0)