diff options
Diffstat (limited to 'crates/hir_def/src')
-rw-r--r-- | crates/hir_def/src/import_map.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/crates/hir_def/src/import_map.rs b/crates/hir_def/src/import_map.rs index 59206cab8..e5368b293 100644 --- a/crates/hir_def/src/import_map.rs +++ b/crates/hir_def/src/import_map.rs | |||
@@ -186,14 +186,16 @@ impl ImportMap { | |||
186 | is_type_in_ns: bool, | 186 | is_type_in_ns: bool, |
187 | original_import_info: &ImportInfo, | 187 | original_import_info: &ImportInfo, |
188 | ) { | 188 | ) { |
189 | mark::hit!(type_aliases_ignored); | ||
190 | for (assoc_item_name, item) in &db.trait_data(tr).items { | 189 | for (assoc_item_name, item) in &db.trait_data(tr).items { |
191 | let module_def_id = match item { | 190 | let module_def_id = match item { |
192 | AssocItemId::FunctionId(f) => ModuleDefId::from(*f), | 191 | AssocItemId::FunctionId(f) => ModuleDefId::from(*f), |
193 | AssocItemId::ConstId(c) => ModuleDefId::from(*c), | 192 | AssocItemId::ConstId(c) => ModuleDefId::from(*c), |
194 | // cannot use associated type aliases directly: need a `<Struct as Trait>::TypeAlias` | 193 | // cannot use associated type aliases directly: need a `<Struct as Trait>::TypeAlias` |
195 | // qualifier, ergo no need to store it for imports in import_map | 194 | // qualifier, ergo no need to store it for imports in import_map |
196 | AssocItemId::TypeAliasId(_) => continue, | 195 | AssocItemId::TypeAliasId(_) => { |
196 | mark::hit!(type_aliases_ignored); | ||
197 | continue; | ||
198 | } | ||
197 | }; | 199 | }; |
198 | let assoc_item = if is_type_in_ns { | 200 | let assoc_item = if is_type_in_ns { |
199 | ItemInNs::Types(module_def_id) | 201 | ItemInNs::Types(module_def_id) |