Skip to content

Commit e1c18f4

Browse files
committed
Document report_redundant_format_arguments()
1 parent 9c921f8 commit e1c18f4

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
@@ -708,6 +708,8 @@ fn report_missing_placeholders(
708708
diag.emit();
709709
}
710710

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

0 commit comments

Comments
 (0)