From 4bad44b917fe1c9e1bd2d1e9ccddc11f858adb4b Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Sat, 12 Aug 2023 19:21:06 -0700 Subject: [PATCH] Raise minimum num-bigint version As of nightly-2023-08-13, num-bigint 0.4.0 no longer compiles because of https://github.com/rust-lang/rust/pull/94455. error[E0308]: mismatched types --> num-bigint-0.4.0/src/biguint/convert.rs:70:19 | 70 | .div_ceil(&big_digit::BITS.into()) | -------- ^^^^^^^^^^^^^^^^^^^^^^^ expected `u64`, found `&_` | | | arguments to this method are incorrect | = note: expected type `u64` found reference `&_` note: method defined here --> .rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/num/mod.rs:1167:5 | 1167 | / uint_impl! { 1168 | | Self = u64, 1169 | | ActualT = u64, 1170 | | SignedT = i64, ... | 1184 | | bound_condition = "", 1185 | | } | |_____^ = note: this error originates in the macro `uint_impl` (in Nightly builds, run with -Z macro-backtrace for more info) help: consider removing the borrow | 70 - .div_ceil(&big_digit::BITS.into()) 70 + .div_ceil(big_digit::BITS.into()) | error[E0308]: mismatched types --> num-bigint-0.4.0/src/biguint/convert.rs:585:19 | 585 | .div_ceil(&u64::from(bits)) | -------- ^^^^^^^^^^^^^^^^ expected `u64`, found `&u64` | | | arguments to this method are incorrect | note: method defined here --> .rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/num/mod.rs:1167:5 | 1167 | / uint_impl! { 1168 | | Self = u64, 1169 | | ActualT = u64, 1170 | | SignedT = i64, ... | 1184 | | bound_condition = "", 1185 | | } | |_____^ = note: this error originates in the macro `uint_impl` (in Nightly builds, run with -Z macro-backtrace for more info) help: consider removing the borrow | 585 - .div_ceil(&u64::from(bits)) 585 + .div_ceil(u64::from(bits)) | error[E0308]: mismatched types --> num-bigint-0.4.0/src/biguint/convert.rs:613:19 | 613 | .div_ceil(&u64::from(bits)) | -------- ^^^^^^^^^^^^^^^^ expected `u64`, found `&u64` | | | arguments to this method are incorrect | note: method defined here --> .rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/num/mod.rs:1167:5 | 1167 | / uint_impl! { 1168 | | Self = u64, 1169 | | ActualT = u64, 1170 | | SignedT = i64, ... | 1184 | | bound_condition = "", 1185 | | } | |_____^ = note: this error originates in the macro `uint_impl` (in Nightly builds, run with -Z macro-backtrace for more info) help: consider removing the borrow | 613 - .div_ceil(&u64::from(bits)) 613 + .div_ceil(u64::from(bits)) | error[E0308]: mismatched types --> num-bigint-0.4.0/src/biguint.rs:398:54 | 398 | let root_scale = extra_bits.div_ceil(&n64); | -------- ^^^^ expected `u64`, found `&u64` | | | arguments to this method are incorrect | note: method defined here --> .rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/num/mod.rs:1167:5 | 1167 | / uint_impl! { 1168 | | Self = u64, 1169 | | ActualT = u64, 1170 | | SignedT = i64, ... | 1184 | | bound_condition = "", 1185 | | } | |_____^ = note: this error originates in the macro `uint_impl` (in Nightly builds, run with -Z macro-backtrace for more info) help: consider removing the borrow | 398 - let root_scale = extra_bits.div_ceil(&n64); 398 + let root_scale = extra_bits.div_ceil(n64); | --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index c502d47..20714a0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ repository = "https://github.com/dtolnay/precise" rust-version = "1.31" [dependencies] -num-bigint = "0.4" +num-bigint = "0.4.2" num-traits = "0.2" [lib]