Skip to main content

PredicateObligation

Type Alias PredicateObligation 

Source
pub(crate) type PredicateObligation<'db> = Obligation<'db, Predicate<'db>>;

Aliased Type§

pub(crate) struct PredicateObligation<'db> {
    pub cause: ObligationCause,
    pub param_env: ParamEnv<'db>,
    pub predicate: Predicate<'db>,
    pub recursion_depth: usize,
}

Fields§

§cause: ObligationCause

The reason we have to prove this thing.

§param_env: ParamEnv<'db>

The environment in which we should prove this thing.

§predicate: Predicate<'db>

The thing we are trying to prove.

§recursion_depth: usize

If we started proving this as a result of trying to prove something else, track the total depth to ensure termination. If this goes over a certain threshold, we abort compilation – in such cases, we can not say whether or not the predicate holds for certain. Stupid halting problem; such a drag.