Skip to content

Commit

Permalink
Update the definition of borrowing_sub
Browse files Browse the repository at this point in the history
This ensures that it matches the one in `carrying_add`.
  • Loading branch information
TDecking authored and gitbot committed Feb 20, 2025
1 parent bb323d6 commit 86f0820
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/num/uint_macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2445,7 +2445,7 @@ macro_rules! uint_impl {
// to generate optimal code for now, and LLVM doesn't have an equivalent intrinsic
let (a, b) = self.overflowing_sub(rhs);
let (c, d) = a.overflowing_sub(borrow as $SelfT);
(c, b || d)
(c, b | d)
}

/// Calculates `self` - `rhs` with a signed `rhs`
Expand Down

0 comments on commit 86f0820

Please sign in to comment.