Uh oh!
There was an error while loading. Please reload this page.
add Formatter::debug - #49068
Conversation
rust-highfive
commented
Mar 16, 2018
r? @kennytm (rust_highfive has picked a reviewer for you, use r? to override) |
Centril
commented
Mar 16, 2018
r? @sfackler |
In the example, why not simply use |
Centril
commented
Mar 16, 2018
Per discussion with @kennytm on #rust-libs I updated the example to one where you can't use the above snippet (since there's a diff btw |
ollie27
commented
Mar 16, 2018
Why only for |
sfackler
commented
Mar 17, 2018
If we had done the fmt traits "right" their method names would match the type names rather than all being pubtraitDisplay{fnfmt(&self,fmt:&mut fmt::Formatter) -> fmt::Result;fndisplay(&self,fmt:&mut fmt::Formatter) -> fmt::Result{self.fmt(fmt)}} |
@sfackler This will cause new methods named |
sfackler
commented
Mar 17, 2018
Adding new methods to a trait will cause new methods to appear, yeah. This would not be the first time we've added methods to a trait. We'd want to run crater to see if there's a surprising amount of breakage like we did for e.g. |
kennytm
commented
Mar 17, 2018
Sure, but these are not like super useful method that would be commonly used, so I prefer not to take the risk here :D |
Centril
commented
Mar 18, 2018
Hmm; while I agree on @sfackler's point that @ollie27 I can change to include |
bors
commented
Mar 19, 2018
☔ The latest upstream changes (presumably #48978) made this pull request unmergeable. Please resolve the merge conflicts. |
shepmaster
commented
Mar 23, 2018
Centril
commented
Mar 23, 2018
That's not for me to decide; but I think @sfackler suggested addition tries to solve a different issue, that |
sfackler
commented
Mar 28, 2018
The asymmetry is with |
Indeed it is.
Personally, it bugs me a bit, but not much. Shall I close the PR then? |
sfackler
commented
Mar 29, 2018
Yeah I'd lean towards closing. |
Centril
commented
Mar 29, 2018
Alright, closing then =) |
Adds (to
std::fmt::Formatter):which is intended to aid in
Debugimpls and read better thanD::fmt(&d, fmt).