]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_typeck/src/check/closure.rs
Use Term in ProjectionPredicate
[rust.git] / compiler / rustc_typeck / src / check / closure.rs
index 4a41552a5fbef4c83a1ccfd89f56a1bd4a8bb450..c8e1d8b190c9d6ca10585203beacd44ca28e347d 100644 (file)
@@ -80,7 +80,7 @@ fn check_closure(
 
         let generator_types = check_fn(
             self,
-            self.param_env,
+            self.param_env.without_const(),
             liberated_sig,
             decl,
             expr.hir_id,
@@ -279,7 +279,7 @@ fn deduce_sig_from_projection(
             return None;
         };
 
-        let ret_param_ty = projection.skip_binder().ty;
+        let ret_param_ty = projection.skip_binder().term.ty();
         let ret_param_ty = self.resolve_vars_if_possible(ret_param_ty);
         debug!("deduce_sig_from_projection: ret_param_ty={:?}", ret_param_ty);
 
@@ -706,7 +706,7 @@ fn deduce_future_output_from_projection(
         // Extract the type from the projection. Note that there can
         // be no bound variables in this type because the "self type"
         // does not have any regions in it.
-        let output_ty = self.resolve_vars_if_possible(predicate.ty);
+        let output_ty = self.resolve_vars_if_possible(predicate.term.ty());
         debug!("deduce_future_output_from_projection: output_ty={:?}", output_ty);
         Some(output_ty)
     }