aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/nameres/collector.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir/src/nameres/collector.rs')
-rw-r--r--crates/ra_hir/src/nameres/collector.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/crates/ra_hir/src/nameres/collector.rs b/crates/ra_hir/src/nameres/collector.rs
index 9f197bb58..1c3b453bd 100644
--- a/crates/ra_hir/src/nameres/collector.rs
+++ b/crates/ra_hir/src/nameres/collector.rs
@@ -8,11 +8,12 @@ use test_utils::tested_by;
8use crate::{ 8use crate::{
9 either::Either, 9 either::Either,
10 ids::{AstItemDef, LocationCtx, MacroCallId, MacroCallLoc, MacroDefId, MacroFileKind}, 10 ids::{AstItemDef, LocationCtx, MacroCallId, MacroCallLoc, MacroDefId, MacroFileKind},
11 name::MACRO_RULES,
11 nameres::{ 12 nameres::{
12 diagnostics::DefDiagnostic, raw, CrateDefMap, CrateModuleId, ItemOrMacro, ModuleData, 13 diagnostics::DefDiagnostic, raw, CrateDefMap, CrateModuleId, ItemOrMacro, ModuleData,
13 ModuleDef, PerNs, ReachedFixedPoint, Resolution, ResolveMode, 14 ModuleDef, PerNs, ReachedFixedPoint, Resolution, ResolveMode,
14 }, 15 },
15 AstId, Const, DefDatabase, Enum, Function, HirFileId, KnownName, MacroDef, Module, Name, Path, 16 AstId, Const, DefDatabase, Enum, Function, HirFileId, MacroDef, Module, Name, Path,
16 Static, Struct, Trait, TypeAlias, Union, 17 Static, Struct, Trait, TypeAlias, Union,
17}; 18};
18 19
@@ -624,7 +625,7 @@ where
624} 625}
625 626
626fn is_macro_rules(path: &Path) -> bool { 627fn is_macro_rules(path: &Path) -> bool {
627 path.as_ident().and_then(Name::as_known_name) == Some(KnownName::MacroRules) 628 path.as_ident() == Some(&MACRO_RULES)
628} 629}
629 630
630fn resolve_submodule( 631fn resolve_submodule(