rustc_ast_lowering::format

Function flatten_format_args

Source
fn flatten_format_args(fmt: Cow<'_, FormatArgs>) -> Cow<'_, FormatArgs>
Expand description

Flattens nested format_args!() into one.

Turns

format_args!("a {} {} {}.", 1, format_args!("b{}!", 2), 3)

into

format_args!("a {} b{}! {}.", 1, 2, 3).