Partially stabilize int_roundings by jhpratt · Pull Request #94455 · rust-lang/rust (original) (raw)

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);
     |