pub fn obligations<'tcx>(
infcx: &InferCtxt<'tcx>,
param_env: ParamEnv<'tcx>,
body_id: LocalDefId,
recursion_depth: usize,
term: Term<'tcx>,
span: Span,
) -> Option<PredicateObligations<'tcx>>
Expand description
Returns the set of obligations needed to make arg
well-formed.
If arg
contains unresolved inference variables, this may include
further WF obligations. However, if arg
IS an unresolved
inference variable, returns None
, because we are not able to
make any progress at all. This is to prevent cycles where we
say “?0 is WF if ?0 is WF”.