Skip to content

Commit 7a89baf

Browse files
matthiaskrgrgitbot
authored and
gitbot
committed
Rollup merge of rust-lang#133796 - TDecking:borrowing-sub, r=tgross35
Update the definition of `borrowing_sub` Complementary PR to rust-lang#133674, which only updated `carrying_add`.
2 parents c1f0271 + 6d5bc49 commit 7a89baf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/num/uint_macros.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2445,7 +2445,7 @@ macro_rules! uint_impl {
24452445
// to generate optimal code for now, and LLVM doesn't have an equivalent intrinsic
24462446
let (a, b) = self.overflowing_sub(rhs);
24472447
let (c, d) = a.overflowing_sub(borrow as $SelfT);
2448-
(c, b || d)
2448+
(c, b | d)
24492449
}
24502450

24512451
/// Calculates `self` - `rhs` with a signed `rhs`

0 commit comments

Comments
 (0)