diff --git a/crates/ra_hir_def/src/item_scope.rs b/crates/ra_hir_def/src/item_scope.rs index 7792ed709a..fc15948adf 100644 --- a/crates/ra_hir_def/src/item_scope.rs +++ b/crates/ra_hir_def/src/item_scope.rs @@ -159,10 +159,10 @@ impl PerNs { AdtId::UnionId(_) => PerNs::types(def, v), AdtId::EnumId(_) => PerNs::types(def, v), AdtId::StructId(_) => { - if !has_constructor { - PerNs::types(def, v) - } else { + if has_constructor { PerNs::both(def, def, v) + } else { + PerNs::types(def, v) } } },