diff options
Diffstat (limited to 'crates/hir_ty/src/lower.rs')
-rw-r--r-- | crates/hir_ty/src/lower.rs | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/crates/hir_ty/src/lower.rs b/crates/hir_ty/src/lower.rs index d01933e6b..c99dd8d0a 100644 --- a/crates/hir_ty/src/lower.rs +++ b/crates/hir_ty/src/lower.rs | |||
@@ -414,17 +414,16 @@ impl<'a> TyLoweringContext<'a> { | |||
414 | self.lower_trait_ref_from_resolved_path(trait_, resolved_segment, self_ty); | 414 | self.lower_trait_ref_from_resolved_path(trait_, resolved_segment, self_ty); |
415 | let ty = if remaining_segments.len() == 1 { | 415 | let ty = if remaining_segments.len() == 1 { |
416 | let segment = remaining_segments.first().unwrap(); | 416 | let segment = remaining_segments.first().unwrap(); |
417 | let found = associated_type_by_name_including_super_traits( | 417 | let found = self |
418 | self.db, | 418 | .db |
419 | trait_ref, | 419 | .trait_data(trait_ref.hir_trait_id()) |
420 | &segment.name, | 420 | .associated_type_by_name(&segment.name); |
421 | ); | ||
422 | match found { | 421 | match found { |
423 | Some((super_trait_ref, associated_ty)) => { | 422 | Some(associated_ty) => { |
424 | // FIXME handle type parameters on the segment | 423 | // FIXME handle type parameters on the segment |
425 | TyKind::Alias(AliasTy::Projection(ProjectionTy { | 424 | TyKind::Alias(AliasTy::Projection(ProjectionTy { |
426 | associated_ty_id: to_assoc_type_id(associated_ty), | 425 | associated_ty_id: to_assoc_type_id(associated_ty), |
427 | substitution: super_trait_ref.substitution, | 426 | substitution: trait_ref.substitution, |
428 | })) | 427 | })) |
429 | .intern(&Interner) | 428 | .intern(&Interner) |
430 | } | 429 | } |