-
Notifications
You must be signed in to change notification settings - Fork 13.3k
std::fmt future-proofing: should precision
be static error for integral types?
#24767
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
Comments
nominating (for needs-decision, basically). |
A somewhat related question would be "do we even make any back compat guarantees with respect to the output of formatters?" We obviously won't want to do anything totally crazy like making the default output format for integers hex, but will/should anyone care if we do start using the precision parameter in the future? As one example, the |
I think someone using (That's essentially why I'm suggesting we consider trying to catch no-op cases like this today.) (I also think that we would be within our rights to arbitrarily change the output behavior for the |
Consensus is to just say "is ignored for integral types", i.e. get rid of the word "currently" that implies it may change in the future. |
(spawned off of #24662)
The docs for the
precision
formatting parmeter http://doc.rust-lang.org/nightly/std/fmt/index.html#precision currently say:What that text apparently means today is "we silently ignore any such parameter"
The phrase "has no meaning currently" to me implies that we might add meaning in the future.
I do not even know if we could make this be a static error in a reasonable way for 1.0. But I figured I would ask the question: Should we consider trying to do so? Or should we just commit, for purposes of backwards compatibility, to this being a no-op for integral parameters?
The text was updated successfully, but these errors were encountered: