aboutsummaryrefslogtreecommitdiff
path: root/crates/hir
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
parentdfafcd926a4cc9b09aba0eb3cc5275a4abe633b9 (diff)
Use chalk_ir::AssocTypeId
Diffstat (limited to 'crates/hir')
-rw-r--r--crates/hir/src/lib.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/crates/hir/src/lib.rs b/crates/hir/src/lib.rs
index 7b9de11ed..f15fb1a82 100644
--- a/crates/hir/src/lib.rs
+++ b/crates/hir/src/lib.rs
@@ -51,7 +51,7 @@ use hir_expand::{diagnostics::DiagnosticSink, name::name, MacroDefKind};
51use hir_ty::{ 51use hir_ty::{
52 autoderef, 52 autoderef,
53 display::{write_bounds_like_dyn_trait_with_prefix, HirDisplayError, HirFormatter}, 53 display::{write_bounds_like_dyn_trait_with_prefix, HirDisplayError, HirFormatter},
54 method_resolution, 54 method_resolution, to_assoc_type_id,
55 traits::{FnTrait, Solution, SolutionVariables}, 55 traits::{FnTrait, Solution, SolutionVariables},
56 AliasTy, BoundVar, CallableDefId, CallableSig, Canonical, DebruijnIndex, GenericPredicate, 56 AliasTy, BoundVar, CallableDefId, CallableSig, Canonical, DebruijnIndex, GenericPredicate,
57 InEnvironment, Interner, Obligation, ProjectionPredicate, ProjectionTy, Scalar, Substs, 57 InEnvironment, Interner, Obligation, ProjectionPredicate, ProjectionTy, Scalar, Substs,
@@ -1683,7 +1683,10 @@ impl Type {
1683 .fill(args.iter().map(|t| t.ty.value.clone())) 1683 .fill(args.iter().map(|t| t.ty.value.clone()))
1684 .build(); 1684 .build();
1685 let predicate = ProjectionPredicate { 1685 let predicate = ProjectionPredicate {
1686 projection_ty: ProjectionTy { associated_ty: alias.id, parameters: subst }, 1686 projection_ty: ProjectionTy {
1687 associated_ty: to_assoc_type_id(alias.id),
1688 parameters: subst,
1689 },
1687 ty: TyKind::BoundVar(BoundVar::new(DebruijnIndex::INNERMOST, 0)).intern(&Interner), 1690 ty: TyKind::BoundVar(BoundVar::new(DebruijnIndex::INNERMOST, 0)).intern(&Interner),
1688 }; 1691 };
1689 let goal = Canonical { 1692 let goal = Canonical {