fn get_impl_substs<'tcx>(
    tcx: TyCtxt<'tcx>,
    impl1_def_id: LocalDefId,
    impl2_node: Node
) -> Option<(SubstsRef<'tcx>, SubstsRef<'tcx>)>
Expand description

Given a specializing impl impl1, and the base impl impl2, returns two substitutions (S1, S2) that equate their trait references. The returned types are expressed in terms of the generics of impl1.

Example

impl<A, B> Foo<A> for B { /* impl2 */ }
impl<C> Foo<Vec<C>> for C { /* impl1 */ }

Would return S1 = [C] and S2 = [Vec<C>, C].