diff options
Diffstat (limited to 'crates/hir_ty/src/autoderef.rs')
-rw-r--r-- | crates/hir_ty/src/autoderef.rs | 3 |
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 | ||
13 | use crate::{ | 13 | use 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); |