File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -77,10 +77,21 @@ pub enum IntercrateMode {
77
77
/// scope. The eventual result is usually a `Selection` (defined below).
78
78
#[ derive( Clone , PartialEq , Eq , Hash ) ]
79
79
pub struct Obligation < ' tcx , T > {
80
+ /// Why do we have to prove this thing?
80
81
pub cause : ObligationCause < ' tcx > ,
82
+
83
+ /// In which environment should we prove this thing?
81
84
pub param_env : ty:: ParamEnv < ' tcx > ,
82
- pub recursion_depth : usize ,
85
+
86
+ /// What are we trying to prove?
83
87
pub predicate : T ,
88
+
89
+ /// If we started proving this as a result of trying to prove
90
+ /// something else, track the total depth to ensure termination.
91
+ /// If this goes over a certain threshold, we abort compilation --
92
+ /// in such cases, we can not say whether or not the predicate
93
+ /// holds for certain. Stupid halting problem. Such a drag.
94
+ pub recursion_depth : usize ,
84
95
}
85
96
86
97
pub type PredicateObligation < ' tcx > = Obligation < ' tcx , ty:: Predicate < ' tcx > > ;
You can’t perform that action at this time.
0 commit comments