rustc_trait_selection::traits::wf

Function trait_obligations

Source
pub fn trait_obligations<'tcx>(
    infcx: &InferCtxt<'tcx>,
    param_env: ParamEnv<'tcx>,
    body_id: LocalDefId,
    trait_pred: TraitPredicate<'tcx>,
    span: Span,
    item: &'tcx Item<'tcx>,
) -> PredicateObligations<'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 bound Foo: Set<Bar> is WF if Bar: Eq.