pub(crate) fn generate_trait_impl(
make: &SyntaxFactory,
is_unsafe: bool,
adt: &Adt,
trait_: Type,
) -> ImplExpand description
Generates the corresponding impl <trait> for Type {} including type
and lifetime parameters, with <trait> appended to impl‘s generic parameters’ bounds.
This is useful for traits like PartialEq, since impl<T> PartialEq for U<T> often requires T: PartialEq.