]> git.proxmox.com Git - rustc.git/blobdiff - library/core/src/num/bignum.rs
New upstream version 1.65.0+dfsg1
[rustc.git] / library / core / src / num / bignum.rs
index de85fdd6ed2462dcd48c83e7d90144ff34089f34..d2a21b6b38260770323a2d68b39bc0471b09c47b 100644 (file)
@@ -137,7 +137,7 @@ macro_rules! define_bignum {
                 // Find the most significant non-zero digit.
                 let msd = digits.iter().rposition(|&x| x != 0);
                 match msd {
-                    Some(msd) => msd * digitbits + digits[msd].log2() as usize + 1,
+                    Some(msd) => msd * digitbits + digits[msd].ilog2() as usize + 1,
                     // There are no non-zero digits, i.e., the number is zero.
                     _ => 0,
                 }