about summary refs log tree commit diff
path: root/compiler/rustc_infer/src
diff options
context:
space:
mode:
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()