Skip to content

Commit aafcb80

Browse files
authored
Rollup merge of #146123 - IoaNNUwU:issue-68293, r=estebank
Suggest examples of format specifiers in error messages Format macro now suggests adding `{}` if no formatting specifiers are present. It also gives an example: ```rust LL | println!("Hello", "World"); | ------- ^^^^^^^ argument never used | | | formatting specifier missing | = note: format specifiers use curly braces: `{}` help: consider adding format specifier | LL | println!("Hello{}", "World"); | ++ ``` When one or more `{}` are present, it doesn't show 'format specifiers use curly braces: `{}`' and example, just small hint on how many you missing: ```rust LL | println!("list: {}", 1, 2, 3); | ---------- ^ ^ argument never used | | | | | argument never used | multiple missing formatting specifiers | = help: consider adding 2 format specifiers ``` Original issue: rust-lang/rust#68293 Based on discussion in this PR: rust-lang/rust#76443 Let me know if something is missing
2 parents e1b48bc + 2cd688f commit aafcb80

File tree

0 file changed

+0
-0
lines changed

    0 file changed

    +0
    -0
    lines changed

    0 commit comments

    Comments
     (0)