From b035c314b4b0ecd2477fde216dbe7e8801f94d0d Mon Sep 17 00:00:00 2001 From: Florian Diebold Date: Sat, 13 Mar 2021 20:05:47 +0100 Subject: Use chalk_ir::OpaqueTyId --- crates/hir_ty/src/infer/expr.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'crates/hir_ty/src/infer') 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::{ to_assoc_type_id, traits::{chalk::from_chalk, FnTrait, InEnvironment}, utils::{generics, variant_data, Generics}, - AdtId, Binders, CallableDefId, FnPointer, FnSig, Interner, Obligation, OpaqueTyId, Rawness, - Scalar, Substs, TraitRef, Ty, TyKind, + AdtId, Binders, CallableDefId, FnPointer, FnSig, Interner, Obligation, Rawness, Scalar, Substs, + TraitRef, Ty, TyKind, }; use super::{ @@ -179,7 +179,8 @@ impl<'a> InferenceContext<'a> { // Use the first type parameter as the output type of future. // existenail type AsyncBlockImplTrait: Future let inner_ty = self.infer_expr(*body, &Expectation::none()); - let opaque_ty_id = OpaqueTyId::AsyncBlockTypeImplTrait(self.owner, *body); + let impl_trait_id = crate::ImplTraitId::AsyncBlockTypeImplTrait(self.owner, *body); + let opaque_ty_id = self.db.intern_impl_trait_id(impl_trait_id).into(); TyKind::OpaqueType(opaque_ty_id, Substs::single(inner_ty)).intern(&Interner) } Expr::Loop { body, label } => { -- cgit v1.2.3