Function rustc_trait_selection::traits::wf::trait_obligations
source · pub fn trait_obligations<'a, 'tcx>(
infcx: &InferCtxt<'a, 'tcx>,
param_env: ParamEnv<'tcx>,
body_id: HirId,
trait_pred: &TraitPredicate<'tcx>,
span: Span,
item: &'tcx Item<'tcx>
) -> Vec<PredicateObligation<'tcx>>
Expand description
Returns the obligations that make this trait reference
well-formed. For example, if there is a trait Set
defined like
trait Set<K:Eq>
, then the trait reference Foo: Set<Bar>
is WF
if Bar: Eq
.