- 
                Notifications
    You must be signed in to change notification settings 
- Fork 13.9k
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-suggestion-diagnosticsArea: Suggestions generated by the compiler applied by `cargo fix`Area: Suggestions generated by the compiler applied by `cargo fix`P-lowLow priorityLow priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
i've tried
fn main() {
    let num = 0x0abcde;
    let width = 6;
    print!("%0*x", width, num);
}i expected:
error: multiple unused formatting arguments
 --> src/main.rs:4:19
  |
4 |     print!("%0*x", width, num);
  |            -----  ^^^^^  ^^^ argument never used
  |            ||     |
  |            ||     argument never used
  |            |help: format specifiers use curly braces: `{1:00$x}`
  |            multiple missing formatting specifiers
  |
  = note: printf formatting not supported; see the documentation for `std::fmt`
the actual error message does not contain such a help message:
error: multiple unused formatting arguments
 --> src/main.rs:4:20
  |
4 |     print!("%0*x", width, num);
  |            ------  ^^^^^  ^^^ argument never used
  |            |       |
  |            |       argument never used
  |            multiple missing formatting specifiers
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-suggestion-diagnosticsArea: Suggestions generated by the compiler applied by `cargo fix`Area: Suggestions generated by the compiler applied by `cargo fix`P-lowLow priorityLow priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.