aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_ty/src/autoderef.rs
diff options
context:
space:
mode:
authorFlorian Diebold <[email protected]>2021-03-13 16:36:07 +0000
committerFlorian Diebold <[email protected]>2021-03-13 16:56:48 +0000
commit19664e276aba21a42cad5351a2c91995d1ce5d52 (patch)
tree34a0c9ed9c374605f59ab839a5c8193b440c7a2a /crates/hir_ty/src/autoderef.rs
parentdfafcd926a4cc9b09aba0eb3cc5275a4abe633b9 (diff)
Use chalk_ir::AssocTypeId
Diffstat (limited to 'crates/hir_ty/src/autoderef.rs')
-rw-r--r--crates/hir_ty/src/autoderef.rs3
1 files changed, 2 insertions, 1 deletions
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};
12 12
13use crate::{ 13use crate::{
14 db::HirDatabase, 14 db::HirDatabase,
15 to_assoc_type_id,
15 traits::{InEnvironment, Solution}, 16 traits::{InEnvironment, Solution},
16 utils::generics, 17 utils::generics,
17 BoundVar, Canonical, DebruijnIndex, Interner, Obligation, Substs, TraitRef, Ty, TyKind, 18 BoundVar, Canonical, DebruijnIndex, Interner, Obligation, Substs, TraitRef, Ty, TyKind,
@@ -83,7 +84,7 @@ fn deref_by_trait(
83 let projection = super::traits::ProjectionPredicate { 84 let projection = super::traits::ProjectionPredicate {
84 ty: TyKind::BoundVar(BoundVar::new(DebruijnIndex::INNERMOST, ty.value.kinds.len())) 85 ty: TyKind::BoundVar(BoundVar::new(DebruijnIndex::INNERMOST, ty.value.kinds.len()))
85 .intern(&Interner), 86 .intern(&Interner),
86 projection_ty: super::ProjectionTy { associated_ty: target, parameters }, 87 projection_ty: super::ProjectionTy { associated_ty: to_assoc_type_id(target), parameters },
87 }; 88 };
88 89
89 let obligation = super::Obligation::Projection(projection); 90 let obligation = super::Obligation::Projection(projection);