Skip to content

Commit

Permalink
Raise minimum num-bigint version
Browse files Browse the repository at this point in the history
As of nightly-2023-08-13, num-bigint 0.4.0 no longer compiles because of rust-lang/rust#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);
         |
  • Loading branch information
dtolnay committed Aug 13, 2023
1 parent fc526e5 commit 4bad44b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit 4bad44b

Please sign in to comment.