@@ -92,38 +92,31 @@ pub enum ProjectionCacheEntry<'tcx> {
9292 Error ,
9393 NormalizedTerm {
9494 ty : NormalizedTerm < ' tcx > ,
95- /// If we were able to successfully evaluate the
96- /// corresponding cache entry key during predicate
97- /// evaluation, then this field stores the final
98- /// result obtained from evaluating all of the projection
99- /// sub-obligations. During evaluation, we will skip
100- /// evaluating the cached sub-obligations in `ty`
101- /// if this field is set. Evaluation only
102- /// cares about the final result, so we don't
103- /// care about any region constraint side-effects
104- /// produced by evaluating the sub-obligations.
95+ /// If we were able to successfully evaluate the corresponding cache
96+ /// entry key during predicate evaluation, then this field stores the
97+ /// final result obtained from evaluating all of the projection
98+ /// sub-obligations. During evaluation, we will skip evaluating the
99+ /// cached sub-obligations in `ty` if this field is set. Evaluation
100+ /// only cares about the final result, so we don't care about any
101+ /// region constraint side-effects produced by evaluating the
102+ /// sub-obligations.
105103 ///
106- /// Additionally, we will clear out the sub-obligations
107- /// entirely if we ever evaluate the cache entry (along
108- /// with all its sub obligations) to `EvaluatedToOk`.
109- /// This affects all users of the cache, not just evaluation.
110- /// Since a result of `EvaluatedToOk` means that there were
111- /// no region obligations that need to be tracked, it's
112- /// fine to forget about the sub-obligations - they
113- /// don't provide any additional information. However,
114- /// we do *not* discard any obligations when we see
115- /// `EvaluatedToOkModuloRegions` - we don't know
116- /// which sub-obligations may introduce region constraints,
117- /// so we keep them all to be safe.
104+ /// Additionally, we will clear out the sub-obligations entirely if we
105+ /// ever evaluate the cache entry (along with all its sub obligations)
106+ /// to `EvaluatedToOk`. This affects all users of the cache, not just
107+ /// evaluation. Since a result of `EvaluatedToOk` means that there were
108+ /// no region obligations that need to be tracked, it's fine to forget
109+ /// about the sub-obligations - they don't provide any additional
110+ /// information. However, we do *not* discard any obligations when we
111+ /// see `EvaluatedToOkModuloRegions` - we don't know which
112+ /// sub-obligations may introduce region constraints, so we keep them
113+ /// all to be safe.
118114 ///
119- /// When we are not performing evaluation
120- /// (e.g. in `FulfillmentContext`), we ignore this field,
121- /// and always re-process the cached sub-obligations
122- /// (which may have been cleared out - see the above
123- /// paragraph).
124- /// This ensures that we do not lose any regions
125- /// constraints that arise from processing the
126- /// sub-obligations.
115+ /// When we are not performing evaluation (e.g. in
116+ /// `FulfillmentContext`), we ignore this field, and always re-process
117+ /// the cached sub-obligations (which may have been cleared out - see
118+ /// the above paragraph). This ensures that we do not lose any regions
119+ /// constraints that arise from processing the sub-obligations.
127120 complete : Option < EvaluationResult > ,
128121 } ,
129122}
0 commit comments