Diagnostic for mismatching argument count is misleading on nightly #96880
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-suggestion-diagnostics
Area: Suggestions generated by the compiler applied by `cargo fix`
D-invalid-suggestion
Diagnostics: A structured suggestion resulting in incorrect code.
D-papercut
Diagnostics: An error or lint that needs small tweaks.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
The compiler nicely reports when calling a function with too few arguments:
leads to
The compiler (on nightly) suggests:
This looks like a literal fix suggestion. However, the
{_}
is probably intended as just a placeholder. Obviously inserting that directly yields another compiler error:See example on playground.
I personally think the warning is already meaningful enough without the
provide the argument
section (i.e. the way beta and stable handle this).The text was updated successfully, but these errors were encountered: