-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Forward formatter settings to bounds of Range<T>
in fmt::Debug
impl
#59596
Conversation
r? @Kimundi (rust_highfive has picked a reviewer for you, use r? to override) |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
Before this change, formatter settings were lost when printing a `Range`. For example, printing a `Range<f32>` with `{:.2?}` would not apply the precision modifier when printing the floats. Now the `Debug` impls look a bit more verbose, but modifier are not lost.
a3b9724
to
d3d3049
Compare
You are right that in theory the output of And since this seems to be already the same behavior as in, for example, @bors: r+ |
📌 Commit d3d3049 has been approved by |
…mundi Forward formatter settings to bounds of `Range<T>` in `fmt::Debug` impl Before this change, formatter settings were lost when printing a `Range`. For example, printing a `Range<f32>` with `{:.2?}` would not apply the precision modifier when printing the floats. Now the `Debug` impls look a bit more verbose, but modifier are not lost. --- I assume the exact output of `Debug` impls in `std` cannot be relied on by users and thus can change, right?
…mundi Forward formatter settings to bounds of `Range<T>` in `fmt::Debug` impl Before this change, formatter settings were lost when printing a `Range`. For example, printing a `Range<f32>` with `{:.2?}` would not apply the precision modifier when printing the floats. Now the `Debug` impls look a bit more verbose, but modifier are not lost. --- I assume the exact output of `Debug` impls in `std` cannot be relied on by users and thus can change, right?
Rollup of 8 pull requests Successful merges: - #59470 (Document std::fs::File close behavior ignoring errors) - #59555 (update miri) - #59556 (update stdsimd) - #59596 (Forward formatter settings to bounds of `Range<T>` in `fmt::Debug` impl) - #59639 (Never return uninhabited values at all) - #59671 (Make some of lexer's API private) - #59685 (Add description for -Os and -Oz in rustc.1) - #59686 (Temporarily disable stack probing for gnux32.) Failed merges: r? @ghost
Before this change, formatter settings were lost when printing a
Range
. For example, printing aRange<f32>
with{:.2?}
would not apply the precision modifier when printing the floats. Now theDebug
impls look a bit more verbose, but modifier are not lost.I assume the exact output of
Debug
impls instd
cannot be relied on by users and thus can change, right?