pub fn shallow_resolve_trait_ref<'tcx>(
tcx: TyCtxt<'tcx>,
param_env: ParamEnv<'tcx>,
trait_ref: PolyTraitRef<'tcx>,
) -> Result<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 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 expects that trait_ref
is fully normalized.
This is based on rustc_traits::codegen::codegen_select_candidate
in rustc.