Function rustc_traits::codegen::codegen_select_candidate
source ยท pub fn codegen_select_candidate<'tcx>(
tcx: TyCtxt<'tcx>,
(param_env, trait_ref): (ParamEnv<'tcx>, TraitRef<'tcx>),
) -> Result<&'tcx ImplSource<'tcx, ()>, CodegenObligationError>
Expand description
Attempts to resolve an obligation to an 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.
This also expects that trait_ref
is fully normalized.