fn map_trait_method_parameters(
trait_method: &UnitHead,
impl_method: &UnitHead,
trait_def: &TraitDef,
trait_spec: &TraitSpec,
ctx: &mut Context,
) -> Result<UnitHead>
Expand description
Replaces the generic type parameters in a trait method with the corresponding generic type parameters of the impl block.
This is used to check if the method signature of the impl block matches the method signature of the trait.
e.g. fn foo<T>(self, a: T) -> T
in the trait would be replaced with fn foo<U>(self, a: U) -> U
in the impl block.