Skip to content

Conversation

@josh-kaplan
Copy link

@josh-kaplan josh-kaplan commented Oct 8, 2025

Summary

This PR proposes a fix for #103747 implementing IEEE-754 S4.3 roundTiesToEven for Duration Debug implementation.

Testing

Added new test in time.rs for validating roundTiesToEven behavior in Duration formatting. Reran all debug formatting tests in time.rs with ./x test library/coretests --test-args time::debug_formatting.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Oct 8, 2025
@rustbot
Copy link
Collaborator

rustbot commented Oct 8, 2025

r? @scottmcm

rustbot has assigned @scottmcm.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@hkBst
Copy link
Member

hkBst commented Oct 12, 2025

Maybe also add a test-case for println!("{:.0?}", Duration::MAX);, unless it is already there?

@josh-kaplan
Copy link
Author

Maybe also add a test-case for println!("{:.0?}", Duration::MAX);, unless it is already there?

Fair! It looks like it already exists on line 330 in debug_formatting_extreme_values.

I also updated the comment above the new rounding behavior to accurately reflect the behavior change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants