$OpenBSD: patch-rust_vendor_lexical-core_src_atof_algorithm_bigcomp_rs,v 1.1 2021/06/19 12:39:34 semarie Exp $
Backport of https://github.com/Alexhuszagh/rust-lexical/pull/56 for rustc 1.53.0

Index: rust/vendor/lexical-core/src/atof/algorithm/bigcomp.rs
--- rust/vendor/lexical-core/src/atof/algorithm/bigcomp.rs.orig
+++ rust/vendor/lexical-core/src/atof/algorithm/bigcomp.rs
@@ -154,7 +154,7 @@ pub(super) fn make_ratio<F: Float>(radix: u32, sci_exp
     // Scale the denominator so it has the number of bits
     // in the radix as the number of leading zeros.
     let wlz = integral_binary_factor(radix).as_usize();
-    let nlz = den.leading_zeros().wrapping_sub(wlz) & (u32::BITS - 1);
+    let nlz = den.leading_zeros().wrapping_sub(wlz) & (<u32 as Integer>::BITS - 1);
     small::ishl_bits(den.data_mut(), nlz);
     den.exp -= nlz.as_i32();
 
@@ -172,7 +172,7 @@ pub(super) fn make_ratio<F: Float>(radix: u32, sci_exp
         // denominator will be normalized.
         // We need to add one to the quotient,since we're calculating the
         // ceiling of the divmod.
-        let (q, r) = shift.ceil_divmod(Limb::BITS);
+        let (q, r) = shift.ceil_divmod(<Limb as Integer>::BITS);
         // Since we're using a power from the denominator to the
         // numerator, we to invert r, not add u32::BITS.
         let r = -r;
