about summary refs log tree commit diff
path: root/compiler/rustc_infer/src
diff options
context:
space:
mode:
authorlcnr <rust@lcnr.de>2025-09-26 16:37:03 +0200
committerlcnr <rust@lcnr.de>2025-09-26 16:37:08 +0200
commitc2e39c2f20c568b96fe89c751e65bbbe9116231c (patch)
treea39e314986a87bff5c14affbd05099ee46a627a8 /compiler/rustc_infer/src
parentd6fe5334185385372d1fe8f1c9df8f5d3e7be788 (diff)
downloadrust-c2e39c2f20c568b96fe89c751e65bbbe9116231c.tar.gz
rust-c2e39c2f20c568b96fe89c751e65bbbe9116231c.zip
review
Diffstat (limited to 'compiler/rustc_infer/src')
-rw-r--r--compiler/rustc_infer/src/infer/canonical/query_response.rs11
1 files changed, 4 insertions, 7 deletions
diff --git a/compiler/rustc_infer/src/infer/canonical/query_response.rs b/compiler/rustc_infer/src/infer/canonical/query_response.rs
index a20cd31113a..b3959113d5d 100644
--- a/compiler/rustc_infer/src/infer/canonical/query_response.rs
+++ b/compiler/rustc_infer/src/infer/canonical/query_response.rs
@@ -87,14 +87,11 @@ impl<'tcx> InferCtxt<'tcx> {
     {
         // While we ignore region constraints and pending obligations,
         // we do return constrained opaque types to avoid unconstrained
-        // inference variables in the response. This is still slightly
-        // insufficient as ambiguous `Projection` obligations have the
-        // same issue.
+        // inference variables in the response. This is important as we want
+        // to check that opaques in deref steps stay unconstrained.
         //
-        // FIXME(-Znext-solver): We could alternatively extend the `var_values`
-        // each time we call `make_query_response_ignoring_pending_obligations`
-        // and equate inference variables created inside of the query this way.
-        // This is what we do for `CanonicalState` and is probably a bit nicer.
+        // This doesn't handle the more general case for non-opaques as
+        // ambiguous `Projection` obligations have same the issue.
         let opaque_types = if self.next_trait_solver() {
             self.inner
                 .borrow_mut()