-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Partially stabilize int_roundings
#94455
Conversation
08c164f
to
37bb74d
Compare
With this re-entering FCP, I've updated the PR to reflect the rustc version it will be stabilized in. As there's a release next week, it'll land in 1.63 rather than the currently nightly (1.62). |
☔ The latest upstream changes (presumably #98656) made this pull request unmergeable. Please resolve the merge conflicts. |
@jhpratt if you can resolve these conflicts we can push this forward |
The reason I hadn't resolved the conflicts is because FCP hasn't even started. There is still a blocker in the tracking issue. |
👋 Hello, I'm writing this comment in this stabilization PR to notify you, the authors of this PR, that #100591 has been merged, which implemented a change in how features are stabilized. Your PR has been filed before the change, so will likely require modifications in order to comply with the new rules. I recommend you to:
That's it! The If you have any questions, feel free to drop by the zulip stream, or ping me directly in this PR's thread. Thanks! 👋 |
37bb74d
to
204623a
Compare
☔ The latest upstream changes (presumably #103138) made this pull request unmergeable. Please resolve the merge conflicts. |
It's in FCP. Once that's done, I'll update the PR. |
204623a
to
7f08376
Compare
This comment has been minimized.
This comment has been minimized.
6ca8826
to
62ca5aa
Compare
It only took a year and a half and three FCPs! |
…joshtriplett Partially stabilize `int_roundings` This stabilizes the following: ```rust impl uX { pub const fn div_ceil(self, rhs: Self) -> Self; pub const fn next_multiple_of(self, rhs: Self) -> Self; pub const fn checked_next_multiple_of(self, rhs: Self) -> Option<Self>; } ``` This feature is tracked in rust-lang#88581.
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#94455 (Partially stabilize `int_roundings`) - rust-lang#114132 (Better Debug for Vars and VarsOs) - rust-lang#114584 (E0277 nolonger points at phantom `.await`) - rust-lang#114667 (Record binder for bare trait object in LifetimeCollectVisitor) - rust-lang#114692 (downgrade `internal_features` to warn) - rust-lang#114703 (Cover ParamConst in smir) - rust-lang#114734 (Mark oli as "on vacation") r? `@ghost` `@rustbot` modify labels: rollup
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); |
Currently next_multiple_of() is behinged a Feature gate: int_rounding. See rust-lang/rust#88581 But it seems that this function is stablized in rust 1.73. See rust-lang/rust#94455 Currently Embassy is still using nightly for many other unstable features. So I do see an issue to use this function.
Currently next_multiple_of() is behinged a Feature gate: int_rounding. See rust-lang/rust#88581 But it seems that this function is stablized in rust 1.73. See rust-lang/rust#94455 Currently Embassy is still using nightly for many other unstable features. So I do see an issue to use this function.
What happened to this? It's not stable yet but was supposed to be in 1.73? |
@Rua it's stable for unsigned integers only. You probably tried to use these functions with signed integers. |
This stabilizes the following:
This feature is tracked in #88581.