diff --git a/crates/ra_hir_ty/src/infer.rs b/crates/ra_hir_ty/src/infer.rs index e40df65e31d..32c0d07a597 100644 --- a/crates/ra_hir_ty/src/infer.rs +++ b/crates/ra_hir_ty/src/infer.rs @@ -387,10 +387,12 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> { if let Ty::Opaque(ref predicates) = inner_ty { for p in predicates.iter() { if let GenericPredicate::Projection(projection) = p { - if projection.projection_ty.associated_ty == res_assoc_ty - && projection.ty != Ty::Unknown - { - return projection.ty.clone(); + if projection.projection_ty.associated_ty == res_assoc_ty { + if let ty_app!(_, params) = &projection.ty { + if params.len() == 0 { + return projection.ty.clone(); + } + } } } }