Skip to content
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

Suggest removing redundant arguments in format!() #115324

Merged
merged 12 commits into from
Oct 23, 2023
Merged
Prev Previous commit
Next Next commit
Rename report_redundant_placeholders() to report_redundant_format_arg…
…uments()
  • Loading branch information
francorbacho committed Oct 5, 2023
commit 9c921f843c78a98b8b0eaa40f2b20b60543ebf53
4 changes: 2 additions & 2 deletions compiler/rustc_builtin_macros/src/format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ fn report_missing_placeholders(
.collect::<Vec<_>>();

if !placeholders.is_empty() {
report_redundant_placeholders(ecx, fmt_span, &args, used, placeholders);
report_redundant_format_arguments(ecx, fmt_span, &args, used, placeholders);
diag.cancel();
return;
}
Expand Down Expand Up @@ -708,7 +708,7 @@ fn report_missing_placeholders(
diag.emit();
}

fn report_redundant_placeholders(
fn report_redundant_format_arguments(
ecx: &mut ExtCtxt<'_>,
fmt_span: Span,
args: &FormatArguments,
Expand Down