[−][src]Function rustc_trait_selection::traits::codegen::codegen_fulfill_obligation

pub fn codegen_fulfill_obligation<'tcx>(
    tcx: TyCtxt<'tcx>,
    (param_env, trait_ref): (ParamEnv<'tcx>, PolyTraitRef<'tcx>)
) -> Result<ImplSource<'tcx, ()>, ErrorReported>

Attempts to resolve an obligation to a ImplSource. The result is a shallow ImplSource resolution, meaning that we do not (necessarily) resolve all nested obligations on the impl. Note that type check should guarantee to us that all nested obligations could be resolved if we wanted to.

Assumes that this is run after the entire crate has been successfully type-checked. This also expects that trait_ref is fully normalized.