@@ -163,6 +163,9 @@ impl RegionTracker {
163
163
164
164
/// Determine if the tracked universes of the two SCCs are compatible.
165
165
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.
166
169
self . max_nameable_universe ( ) . can_name ( other. max_nameable_universe ( ) )
167
170
|| other. reachable_placeholders . can_be_named_by ( self . max_nameable_universe ( ) )
168
171
}
@@ -419,12 +422,12 @@ fn rewrite_placeholder_outlives<'tcx>(
419
422
annotation. representative
420
423
) ;
421
424
// 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.
425
428
//
426
- // We prefer the representative as `tries ` in all cases but one: where the problem
427
- // is that the SCC has had its universe lowered to accomodate some other region and
429
+ // We prefer the representative, `r`, as `lt ` in all cases but one: where the problem
430
+ // is that the SCC has had its universe lowered to accommodate some other region and
428
431
// no longer can name its representative. In that case, we blame `r: low_u`, where `low_u`
429
432
// cannot name `r` so that any explanation always starts with the SCC representative.
430
433
let blame_to = if annotation. representative . rvid ( ) == max_u_rvid {
0 commit comments