-
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
stabilize duration_consts_float #131289
stabilize duration_consts_float #131289
Conversation
☔ The latest upstream changes (presumably #131288) made this pull request unmergeable. Please resolve the merge conflicts. |
FCP passed, so @cuviper this should be ready to land. :) I'll resolve the conflicts. |
a7c9d2e
to
181e667
Compare
This PR impl Duration {
pub const fn as_secs_f64(&self) -> f64;
pub const fn as_secs_f32(&self) -> f32;
pub const fn div_duration_f64(self, rhs: Duration) -> f64;
pub const fn div_duration_f32(self, rhs: Duration) -> f32;
} These just rely on The remaining functions are still not stable so the const gate was changed to impl Duration {
pub const fn as_millis_f64(&self) -> f64;
pub const fn as_millis_f32(&self) -> f32;
} @bors r+ |
Rollup of 7 pull requests Successful merges: - rust-lang#124874 (intrinsics fmuladdf{32,64}: expose llvm.fmuladd.* semantics) - rust-lang#130962 (Migrate lib's `&Option<T>` into `Option<&T>`) - rust-lang#131289 (stabilize duration_consts_float) - rust-lang#131310 (Support clobber_abi in MSP430 inline assembly) - rust-lang#131546 (Make unused_parens's suggestion considering expr's attributes.) - rust-lang#131565 (Remove deprecation note in the `non_local_definitions` lint) - rust-lang#131576 (Flatten redundant test module `run_make_support::diff::tests::tests`) r? `@ghost` `@rustbot` modify labels: rollup
Correction, it was changed to |
Rollup of 7 pull requests Successful merges: - rust-lang#124874 (intrinsics fmuladdf{32,64}: expose llvm.fmuladd.* semantics) - rust-lang#130962 (Migrate lib's `&Option<T>` into `Option<&T>`) - rust-lang#131289 (stabilize duration_consts_float) - rust-lang#131310 (Support clobber_abi in MSP430 inline assembly) - rust-lang#131546 (Make unused_parens's suggestion considering expr's attributes.) - rust-lang#131565 (Remove deprecation note in the `non_local_definitions` lint) - rust-lang#131576 (Flatten redundant test module `run_make_support::diff::tests::tests`) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#131289 - RalfJung:duration_consts_float, r=tgross35 stabilize duration_consts_float Waiting for FCP in rust-lang#72440 to pass. `as_millis_f32` and `as_millis_f64` are not stable at all yet, so I moved their const-stability together with their regular stability (tracked at rust-lang#122451). Fixes rust-lang#72440
Waiting for FCP in #72440 to pass.
as_millis_f32
andas_millis_f64
are not stable at all yet, so I moved their const-stability together with their regular stability (tracked at #122451).Fixes #72440