From 19664e276aba21a42cad5351a2c91995d1ce5d52 Mon Sep 17 00:00:00 2001 From: Florian Diebold Date: Sat, 13 Mar 2021 17:36:07 +0100 Subject: Use chalk_ir::AssocTypeId --- crates/hir_ty/src/autoderef.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'crates/hir_ty/src/autoderef.rs') diff --git a/crates/hir_ty/src/autoderef.rs b/crates/hir_ty/src/autoderef.rs index 09009a3d8..d739d5d60 100644 --- a/crates/hir_ty/src/autoderef.rs +++ b/crates/hir_ty/src/autoderef.rs @@ -12,6 +12,7 @@ use log::{info, warn}; use crate::{ db::HirDatabase, + to_assoc_type_id, traits::{InEnvironment, Solution}, utils::generics, BoundVar, Canonical, DebruijnIndex, Interner, Obligation, Substs, TraitRef, Ty, TyKind, @@ -83,7 +84,7 @@ fn deref_by_trait( let projection = super::traits::ProjectionPredicate { ty: TyKind::BoundVar(BoundVar::new(DebruijnIndex::INNERMOST, ty.value.kinds.len())) .intern(&Interner), - projection_ty: super::ProjectionTy { associated_ty: target, parameters }, + projection_ty: super::ProjectionTy { associated_ty: to_assoc_type_id(target), parameters }, }; let obligation = super::Obligation::Projection(projection); -- cgit v1.2.3