Skip to content

Commit 13c249f

Browse files
committed
Document report_redundant_format_arguments()
1 parent c769f12 commit 13c249f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

compiler/rustc_builtin_macros/src/format.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -699,6 +699,8 @@ fn report_missing_placeholders(
699699
diag.emit();
700700
}
701701

702+
// This function detects and reports unused format!() arguments that are
703+
// redundant due to implicit captures (e.g. `format!("{x}", x)`).
702704
fn report_redundant_format_arguments(
703705
ecx: &mut ExtCtxt<'_>,
704706
fmt_span: Span,

0 commit comments

Comments
 (0)