pub fn obligations<'tcx>(
    infcx: &InferCtxt<'tcx>,
    param_env: ParamEnv<'tcx>,
    body_id: LocalDefId,
    recursion_depth: usize,
    arg: GenericArg<'tcx>,
    span: Span
) -> Option<Vec<PredicateObligation<'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 “livelock” where we say “$0 is WF if $0 is WF”.