aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/ty/lower.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-11-25 15:58:17 +0000
committerAleksey Kladov <[email protected]>2019-11-25 15:58:17 +0000
commit1a0da6d4dad846568042f85ad7225b45b3275e49 (patch)
tree3fe683f845d7b3b47f44337303dac2ff8312a832 /crates/ra_hir/src/ty/lower.rs
parent6d2ec8765d418b365dfaf472ab9b2b53b8eeafa9 (diff)
Use TypeAliasId in Ty, pt 2
Diffstat (limited to 'crates/ra_hir/src/ty/lower.rs')
-rw-r--r--crates/ra_hir/src/ty/lower.rs9
1 files changed, 6 insertions, 3 deletions
diff --git a/crates/ra_hir/src/ty/lower.rs b/crates/ra_hir/src/ty/lower.rs
index eb51d31bd..d7d4bb0d6 100644
--- a/crates/ra_hir/src/ty/lower.rs
+++ b/crates/ra_hir/src/ty/lower.rs
@@ -176,7 +176,7 @@ impl Ty {
176 Some(associated_ty) => { 176 Some(associated_ty) => {
177 // FIXME handle type parameters on the segment 177 // FIXME handle type parameters on the segment
178 Ty::Projection(ProjectionTy { 178 Ty::Projection(ProjectionTy {
179 associated_ty, 179 associated_ty: associated_ty.id,
180 parameters: trait_ref.substs, 180 parameters: trait_ref.substs,
181 }) 181 })
182 } 182 }
@@ -268,7 +268,10 @@ impl Ty {
268 .fill_with_unknown() 268 .fill_with_unknown()
269 .build(); 269 .build();
270 // FIXME handle type parameters on the segment 270 // FIXME handle type parameters on the segment
271 return Ty::Projection(ProjectionTy { associated_ty, parameters: substs }); 271 return Ty::Projection(ProjectionTy {
272 associated_ty: associated_ty.id,
273 parameters: substs,
274 });
272 } 275 }
273 } 276 }
274 Ty::Unknown 277 Ty::Unknown
@@ -508,7 +511,7 @@ fn assoc_type_bindings_from_type_bound<'a>(
508 let associated_ty = 511 let associated_ty =
509 match trait_ref.trait_.associated_type_by_name_including_super_traits(db, &name) { 512 match trait_ref.trait_.associated_type_by_name_including_super_traits(db, &name) {
510 None => return GenericPredicate::Error, 513 None => return GenericPredicate::Error,
511 Some(t) => t, 514 Some(t) => t.id,
512 }; 515 };
513 let projection_ty = 516 let projection_ty =
514 ProjectionTy { associated_ty, parameters: trait_ref.substs.clone() }; 517 ProjectionTy { associated_ty, parameters: trait_ref.substs.clone() };