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