aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--crates/ra_hir_def/src/item_scope.rs11
1 files changed, 1 insertions, 10 deletions
diff --git a/crates/ra_hir_def/src/item_scope.rs b/crates/ra_hir_def/src/item_scope.rs
index d0923df6d..4d446c707 100644
--- a/crates/ra_hir_def/src/item_scope.rs
+++ b/crates/ra_hir_def/src/item_scope.rs
@@ -18,15 +18,6 @@ pub(crate) enum ImportType {
18 Named, 18 Named,
19} 19}
20 20
21impl ImportType {
22 fn is_named(&self) -> bool {
23 match self {
24 ImportType::Glob => false,
25 ImportType::Named => true,
26 }
27 }
28}
29
30#[derive(Debug, Default)] 21#[derive(Debug, Default)]
31pub struct PerNsGlobImports { 22pub struct PerNsGlobImports {
32 types: FxHashSet<(LocalModuleId, Name)>, 23 types: FxHashSet<(LocalModuleId, Name)>,
@@ -200,7 +191,7 @@ impl ItemScope {
200 } 191 }
201 (Some(_), Some(_)) 192 (Some(_), Some(_))
202 if $glob_imports.$field.contains(&$lookup) 193 if $glob_imports.$field.contains(&$lookup)
203 && $def_import_type.is_named() => 194 && matches!($def_import_type, ImportType::Named) =>
204 { 195 {
205 mark::hit!(import_shadowed); 196 mark::hit!(import_shadowed);
206 $glob_imports.$field.remove(&$lookup); 197 $glob_imports.$field.remove(&$lookup);