Skip to content

Commit a89c361

Browse files
amandasystemslcnr
andauthored
Update compiler/rustc_borrowck/src/handle_placeholders.rs
Co-authored-by: lcnr <[email protected]>
1 parent 6a325fd commit a89c361

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

compiler/rustc_borrowck/src/handle_placeholders.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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
}

0 commit comments

Comments
 (0)