We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b700443 commit 1f5d30fCopy full SHA for 1f5d30f
crates/ra_hir_def/src/item_scope.rs
@@ -18,15 +18,6 @@ pub(crate) enum ImportType {
18
Named,
19
}
20
21
-impl 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)]
31
pub struct PerNsGlobImports {
32
types: FxHashSet<(LocalModuleId, Name)>,
@@ -200,7 +191,7 @@ impl ItemScope {
200
191
201
192
(Some(_), Some(_))
202
193
if $glob_imports.$field.contains(&$lookup)
203
- && $def_import_type.is_named() =>
194
+ && matches!($def_import_type, ImportType::Named) =>
204
195
{
205
196
mark::hit!(import_shadowed);
206
197
$glob_imports.$field.remove(&$lookup);
0 commit comments