diff options
Diffstat (limited to 'crates/ra_hir/src/nameres')
-rw-r--r-- | crates/ra_hir/src/nameres/collector.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/crates/ra_hir/src/nameres/collector.rs b/crates/ra_hir/src/nameres/collector.rs index 9f197bb58..552a1b6d9 100644 --- a/crates/ra_hir/src/nameres/collector.rs +++ b/crates/ra_hir/src/nameres/collector.rs | |||
@@ -8,12 +8,13 @@ use test_utils::tested_by; | |||
8 | use crate::{ | 8 | use 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, Static, |
16 | Static, Struct, Trait, TypeAlias, Union, | 17 | Struct, Trait, TypeAlias, Union, |
17 | }; | 18 | }; |
18 | 19 | ||
19 | pub(super) fn collect_defs(db: &impl DefDatabase, mut def_map: CrateDefMap) -> CrateDefMap { | 20 | pub(super) fn collect_defs(db: &impl DefDatabase, mut def_map: CrateDefMap) -> CrateDefMap { |
@@ -624,7 +625,7 @@ where | |||
624 | } | 625 | } |
625 | 626 | ||
626 | fn is_macro_rules(path: &Path) -> bool { | 627 | fn 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 | ||
630 | fn resolve_submodule( | 631 | fn resolve_submodule( |