Skip to content

Confusing error message for methods in formatting. #11724

Closed
@ckarmann

Description

@ckarmann

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:

error: argument used to format with `d` was attempted to not be used for formatting

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, ... } ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions