rustc_builtin_macros::format

Function report_redundant_format_arguments

source
fn report_redundant_format_arguments<'a>(
    ecx: &ExtCtxt<'a>,
    args: &FormatArguments,
    used: &[bool],
    placeholders: Vec<(Span, &str)>,
) -> Option<Diag<'a>>
Expand description

This function detects and reports unused format!() arguments that are redundant due to implicit captures (e.g. format!("{x}", x)).