aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/ty/lower.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir/src/ty/lower.rs')
-rw-r--r--crates/ra_hir/src/ty/lower.rs8
1 files changed, 3 insertions, 5 deletions
diff --git a/crates/ra_hir/src/ty/lower.rs b/crates/ra_hir/src/ty/lower.rs
index 9e3afabe0..0ac7920bb 100644
--- a/crates/ra_hir/src/ty/lower.rs
+++ b/crates/ra_hir/src/ty/lower.rs
@@ -263,16 +263,14 @@ impl Ty {
263 }); 263 });
264 let traits = traits_from_env.flat_map(|t| all_super_traits(db, t.id)).map(Trait::from); 264 let traits = traits_from_env.flat_map(|t| all_super_traits(db, t.id)).map(Trait::from);
265 for t in traits { 265 for t in traits {
266 if let Some(associated_ty) = t.associated_type_by_name(db, &segment.name) { 266 if let Some(associated_ty) = db.trait_data(t.id).associated_type_by_name(&segment.name)
267 {
267 let substs = Substs::build_for_def(db, t.id) 268 let substs = Substs::build_for_def(db, t.id)
268 .push(self_ty.clone()) 269 .push(self_ty.clone())
269 .fill_with_unknown() 270 .fill_with_unknown()
270 .build(); 271 .build();
271 // FIXME handle type parameters on the segment 272 // FIXME handle type parameters on the segment
272 return Ty::Projection(ProjectionTy { 273 return Ty::Projection(ProjectionTy { associated_ty, parameters: substs });
273 associated_ty: associated_ty.id,
274 parameters: substs,
275 });
276 } 274 }
277 } 275 }
278 Ty::Unknown 276 Ty::Unknown