-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Confusing error message for methods in formatting. #11724
Comments
Still an issue: fn main() {
println!("This page has been visited {} {:0$}.", 1, 2);
}
(NB. the Explanation: At the moment a formatting parameter can only be used for one style of printing, e.g. argument I guess it could be rephrased to something like
|
Triage: same message today. |
Triage: no change |
Still there... |
I don't get an error with this: fn main() {
println!("This page has been visited {} {:0$}.", 1, 2);
} And for the original from so, I get:
|
I guess this has been fixed now, or at least I can't reproduce. I'm going to go ahead and close this issue. |
Fix missing parenthesis in suboptimal floating point help This fixes rust-lang#11559 by adding a branch in the `Neg` implementation for `Sugg` that adds parentheses to keep precedence in order, then using that in the suggestion. I also removed some needless `.to_string()`s while I was at it. --- changelog: none
Someone asked this question on StackOverflow: http://stackoverflow.com/questions/21273648/how-do-you-use-the-plural-method-in-rust/21274149#21274149
I'm just learning Rust, so I tried to research the subject and I was confused by the error message from rustc:
While I'm not a native English speaker, I can usually understand any technical english text. However I find this error message very difficult to parse. What does "attempted to not be used" mean ?
So, this issue is mainly about the error message: can it be made clearer? or am I just lacking more context to understand it?
As for the StackOverflow problem itself, shouldn't an argument be usable for both format tokens {:d} and {0, format, ... } ?
The text was updated successfully, but these errors were encountered: