Parses the arguments from the given list of tokens, returning the diagnostic
if thereβs a parse error so we can continue parsing other format!
expressions.
Handle invalid references to positional arguments. Output different
errors for the case where all arguments are positional and for when
there are named arguments or numbered positional arguments in the
format string.
This function detects and reports unused format!() arguments that are
redundant due to implicit captures (e.g. format!("{x}", x)
).