rustc_trait_selection::traits::specialize

Function fulfill_implication

Source
fn fulfill_implication<'tcx>(
    infcx: &InferCtxt<'tcx>,
    param_env: ParamEnv<'tcx>,
    source_trait_ref: TraitRef<'tcx>,
    source_impl: DefId,
    target_impl: DefId,
    error_cause: impl Fn(usize, Span) -> ObligationCause<'tcx>,
) -> Result<GenericArgsRef<'tcx>, ()>
Expand description

Attempt to fulfill all obligations of target_impl after unification with source_trait_ref. If successful, returns the generic parameters for all the generics of target_impl, including both those needed to unify with source_trait_ref and those whose identity is determined via a where clause in the impl.