@@ -163,6 +163,9 @@ impl RegionTracker {
163163
164164 /// Determine if the tracked universes of the two SCCs are compatible.
165165 pub ( crate ) fn universe_compatible_with ( & self , other : Self ) -> bool {
166+ // HACK: We first check whether we can name the highest existential universe
167+ // of `other`. This only exists to avoid errors in case that scc already
168+ // depends on a placeholder it cannot name itself.
166169 self . max_nameable_universe ( ) . can_name ( other. max_nameable_universe ( ) )
167170 || other. reachable_placeholders . can_be_named_by ( self . max_nameable_universe ( ) )
168171 }
@@ -419,11 +422,11 @@ fn rewrite_placeholder_outlives<'tcx>(
419422 annotation. representative
420423 ) ;
421424 // We only add one `r: 'static` constraint per SCC, where `r` is the SCC representative.
422- // That constraint is annotated with some outlives relation `tries : unnameable` where
423- // `unnameable` is unnameable from `tries ` and there is a path in the constraint
424- // graph between them.
425+ // That constraint is annotated with some outlives relation `lt : unnameable` where
426+ // `unnameable` is unnameable from `lt ` and there is a path in the constraint graph
427+ // between them.
425428 //
426- // We prefer the representative as `tries ` in all cases but one: where the problem
429+ // We prefer the representative, `r`, as `lt ` in all cases but one: where the problem
427430 // is that the SCC has had its universe lowered to accomodate some other region and
428431 // no longer can name its representative. In that case, we blame `r: low_u`, where `low_u`
429432 // cannot name `r` so that any explanation always starts with the SCC representative.
0 commit comments