about summary refs log tree commit diff
path: root/compiler/rustc_borrowck/src/handle_placeholders.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-09-18 16:55:05 +0000
committerbors <bors@rust-lang.org>2025-09-18 16:55:05 +0000
commit0c0c58b8e453f552ebd7f3a1545acdd109de028c (patch)
tree80fc20e71f5764072222045136debf7ce9297697 /compiler/rustc_borrowck/src/handle_placeholders.rs
parent4cd91ef8223ef54111d21aa9e9e71b3b26477dd3 (diff)
parent24d6259dce2040994897fc6ef765b06cf0270630 (diff)
downloadrust-0c0c58b8e453f552ebd7f3a1545acdd109de028c.tar.gz
rust-0c0c58b8e453f552ebd7f3a1545acdd109de028c.zip
Auto merge of #146727 - matthiaskrgr:rollup-98812uj, r=matthiaskrgr
Rollup of 6 pull requests

Successful merges:

 - rust-lang/rust#146434 (c-variadic: allow c-variadic inherent and trait methods)
 - rust-lang/rust#146487 (Improve `core::num` coverage)
 - rust-lang/rust#146597 (Add span for struct tail recursion limit error)
 - rust-lang/rust#146622 (Add regression test for issue rust-lang/rust#91831)
 - rust-lang/rust#146717 (Clean up universe evaluation during type test evaluation)
 - rust-lang/rust#146723 (Include patch in release notes)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_borrowck/src/handle_placeholders.rs')
-rw-r--r--compiler/rustc_borrowck/src/handle_placeholders.rs10
1 files changed, 3 insertions, 7 deletions
diff --git a/compiler/rustc_borrowck/src/handle_placeholders.rs b/compiler/rustc_borrowck/src/handle_placeholders.rs
index 94379cdebf7..6be90994015 100644
--- a/compiler/rustc_borrowck/src/handle_placeholders.rs
+++ b/compiler/rustc_borrowck/src/handle_placeholders.rs
@@ -166,13 +166,9 @@ impl RegionTracker {
         }
     }
 
-    /// Determine if the tracked universes of the two SCCs are compatible.
-    pub(crate) fn universe_compatible_with(&self, other: Self) -> bool {
-        // HACK: We first check whether we can name the highest existential universe
-        // of `other`. This only exists to avoid errors in case that scc already
-        // depends on a placeholder it cannot name itself.
-        self.max_nameable_universe().can_name(other.max_nameable_universe())
-            || other.reachable_placeholders.can_be_named_by(self.max_nameable_universe())
+    /// Determine if we can name all the placeholders in `other`.
+    pub(crate) fn can_name_all_placeholders(&self, other: Self) -> bool {
+        other.reachable_placeholders.can_be_named_by(self.max_nameable_universe.0)
     }
 
     /// If this SCC reaches a placeholder it can't name, return it.