fn name_params_as_declared(
sig: &mut Signature,
declared: Option<&[String]>,
) -> Vec<RenamedParam>Expand description
Name every parameter of sig, a copy of an impl method’s signature, as
the declaration’s metadata does (declared; arg<i> for a declaration
pattern), so every impl of a trait has the same R formals and argument
errors. Without the declaration’s names, or with another count, which
rustc refuses, a named parameter keeps its name and a pattern becomes
arg<i>. A name already taken gets a _ suffix. Returns each
parameter’s names, in order.