std::time::Duration::from_secs_f64 behavior changed in 1.63.0 #100480
Labels
C-bug
Category: This is a bug.
regression-from-stable-to-stable
Performance or correctness regression from one stable version to another.
T-libs-api
Relevant to the library API team, which will review and decide on the PR/issue.
Milestone
Related release note: https://github.com/rust-lang/rust/blob/stable/RELEASES.md#libraries-3Related PR: Improve Duration::try_from_secs_f32/64 accuracy by directly processing exponent and mantissa #90247Though the PR describes the change is related to improve its truncation better, the changed behavior is rounding up which was down before.EDIT: The upper changes and issue related to 1.60. It is not related to this issue.
I want to check if this is expected change or regression.
Code
I tried this code:
I expected to see this happen: explanation
Until 1.62.1,
Instead, this happened: explanation
In 1.63.0,
Version it worked on
It most recently worked on: Until 1.62.1
Version with regression
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: