]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_infer/src/infer/canonical/query_response.rs
Rollup merge of #82244 - pickfire:patch-6, r=dtolnay
[rust.git] / compiler / rustc_infer / src / infer / canonical / query_response.rs
index 1546c1e559f5765ece48462a571be4f77f4e7d55..2ec9b9e0be4a81ef810a8231d18b5fc103380fd8 100644 (file)
@@ -507,12 +507,7 @@ fn unify_query_response_substitution_guess<R>(
 
         // Unify the original value for each variable with the value
         // taken from `query_response` (after applying `result_subst`).
-        Ok(self.unify_canonical_vars(
-            cause,
-            param_env,
-            original_values,
-            substituted_query_response,
-        )?)
+        self.unify_canonical_vars(cause, param_env, original_values, substituted_query_response)
     }
 
     /// Converts the region constraints resulting from a query into an
@@ -639,6 +634,10 @@ struct QueryTypeRelatingDelegate<'a, 'tcx> {
 }
 
 impl<'tcx> TypeRelatingDelegate<'tcx> for QueryTypeRelatingDelegate<'_, 'tcx> {
+    fn param_env(&self) -> ty::ParamEnv<'tcx> {
+        self.param_env
+    }
+
     fn create_next_universe(&mut self) -> ty::UniverseIndex {
         self.infcx.create_next_universe()
     }