aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_ty/src/infer
diff options
context:
space:
mode:
authorFlorian Diebold <[email protected]>2021-03-13 19:05:47 +0000
committerFlorian Diebold <[email protected]>2021-03-13 19:05:47 +0000
commitb035c314b4b0ecd2477fde216dbe7e8801f94d0d (patch)
treea2e152f5f16dd92f4c4be011be2399998dc7eb6f /crates/hir_ty/src/infer
parent1bf6b7360c3f1d0e20dece5227979bc4d74a352f (diff)
Use chalk_ir::OpaqueTyId
Diffstat (limited to 'crates/hir_ty/src/infer')
-rw-r--r--crates/hir_ty/src/infer/expr.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/crates/hir_ty/src/infer/expr.rs b/crates/hir_ty/src/infer/expr.rs
index 2e21d796c..eee3e6ec5 100644
--- a/crates/hir_ty/src/infer/expr.rs
+++ b/crates/hir_ty/src/infer/expr.rs
@@ -21,8 +21,8 @@ use crate::{
21 to_assoc_type_id, 21 to_assoc_type_id,
22 traits::{chalk::from_chalk, FnTrait, InEnvironment}, 22 traits::{chalk::from_chalk, FnTrait, InEnvironment},
23 utils::{generics, variant_data, Generics}, 23 utils::{generics, variant_data, Generics},
24 AdtId, Binders, CallableDefId, FnPointer, FnSig, Interner, Obligation, OpaqueTyId, Rawness, 24 AdtId, Binders, CallableDefId, FnPointer, FnSig, Interner, Obligation, Rawness, Scalar, Substs,
25 Scalar, Substs, TraitRef, Ty, TyKind, 25 TraitRef, Ty, TyKind,
26}; 26};
27 27
28use super::{ 28use super::{
@@ -179,7 +179,8 @@ impl<'a> InferenceContext<'a> {
179 // Use the first type parameter as the output type of future. 179 // Use the first type parameter as the output type of future.
180 // existenail type AsyncBlockImplTrait<InnerType>: Future<Output = InnerType> 180 // existenail type AsyncBlockImplTrait<InnerType>: Future<Output = InnerType>
181 let inner_ty = self.infer_expr(*body, &Expectation::none()); 181 let inner_ty = self.infer_expr(*body, &Expectation::none());
182 let opaque_ty_id = OpaqueTyId::AsyncBlockTypeImplTrait(self.owner, *body); 182 let impl_trait_id = crate::ImplTraitId::AsyncBlockTypeImplTrait(self.owner, *body);
183 let opaque_ty_id = self.db.intern_impl_trait_id(impl_trait_id).into();
183 TyKind::OpaqueType(opaque_ty_id, Substs::single(inner_ty)).intern(&Interner) 184 TyKind::OpaqueType(opaque_ty_id, Substs::single(inner_ty)).intern(&Interner)
184 } 185 }
185 Expr::Loop { body, label } => { 186 Expr::Loop { body, label } => {