Skip to content

Commit 7b16ab0

Browse files
committed
---
yaml --- r: 55910 b: refs/heads/master c: ffa31d2 h: refs/heads/master v: v3
1 parent 6b4edff commit 7b16ab0

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: e4ca2da42072fccd16aefdc4f2090b0489e8293c
2+
refs/heads/master: ffa31d235badfb5544ddb2de151ccfc66c8a20e6
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 79a2b2eafc3c766cecec8a5f76317693bae9ed17
55
refs/heads/try: 8eb2bab100b42f0ba751552d8eff00eb2134c55a

trunk/src/libstd/num/bigint.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -623,7 +623,7 @@ impl BigUint {
623623
let mut shifted = ~[];
624624
for self.data.each_reverse |elem| {
625625
shifted = ~[(*elem >> n_bits) | borrow] + shifted;
626-
borrow = *elem << (uint::bits - n_bits);
626+
borrow = *elem << (BigDigit::bits - n_bits);
627627
}
628628
return BigUint::new(shifted);
629629
}
@@ -1213,6 +1213,7 @@ mod biguint_tests {
12131213
check(~[1 << 2], 2, ~[1]);
12141214
check(~[1, 2], 3, ~[1 << (BigDigit::bits - 2)]);
12151215
check(~[1, 1, 2], 3 + BigDigit::bits, ~[1 << (BigDigit::bits - 2)]);
1216+
check(~[0, 1], 1, ~[0x80000000]);
12161217
test_shr_bits();
12171218

12181219
#[cfg(target_arch = "x86_64")]

0 commit comments

Comments
 (0)