File tree Expand file tree Collapse file tree 1 file changed +3
-12
lines changed
src/librustc_mir/borrow_check/nll/region_infer Expand file tree Collapse file tree 1 file changed +3
-12
lines changed Original file line number Diff line number Diff line change @@ -432,18 +432,9 @@ impl<'tcx> RegionInferenceContext<'tcx> {
432432 }
433433
434434 /// Once regions have been propagated, this method is used to see
435- /// whether any of the constraints were too strong. In particular,
436- /// we want to check for a case where a universally quantified
437- /// region exceeded its bounds. Consider:
438- ///
439- /// fn foo<'a, 'b>(x: &'a u32) -> &'b u32 { x }
440- ///
441- /// In this case, returning `x` requires `&'a u32 <: &'b u32`
442- /// and hence we establish (transitively) a constraint that
443- /// `'a: 'b`. The `propagate_constraints` code above will
444- /// therefore add `end('a)` into the region for `'b` -- but we
445- /// have no evidence that `'b` outlives `'a`, so we want to report
446- /// an error.
435+ /// whether the "type tests" produced by typeck were satisfied;
436+ /// type tests encode type-outlives relationships like `T:
437+ /// 'a`. See `TypeTest` for more details.
447438 fn check_type_tests < ' gcx > (
448439 & self ,
449440 infcx : & InferCtxt < ' _ , ' gcx , ' tcx > ,
You can’t perform that action at this time.
0 commit comments