diff options
Diffstat (limited to 'crates/ra_hir_def/src/resolver.rs')
-rw-r--r-- | crates/ra_hir_def/src/resolver.rs | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/crates/ra_hir_def/src/resolver.rs b/crates/ra_hir_def/src/resolver.rs index 2694c0438..83013fed3 100644 --- a/crates/ra_hir_def/src/resolver.rs +++ b/crates/ra_hir_def/src/resolver.rs | |||
@@ -14,12 +14,13 @@ use crate::{ | |||
14 | db::DefDatabase, | 14 | db::DefDatabase, |
15 | expr::{ExprId, PatId}, | 15 | expr::{ExprId, PatId}, |
16 | generics::GenericParams, | 16 | generics::GenericParams, |
17 | nameres::{BuiltinShadowMode, CrateDefMap}, | 17 | item_scope::BuiltinShadowMode, |
18 | nameres::CrateDefMap, | ||
18 | path::{ModPath, PathKind}, | 19 | path::{ModPath, PathKind}, |
19 | per_ns::PerNs, | 20 | per_ns::PerNs, |
20 | AdtId, ConstId, ContainerId, DefWithBodyId, EnumId, EnumVariantId, FunctionId, GenericDefId, | 21 | AdtId, AssocContainerId, ConstId, ContainerId, DefWithBodyId, EnumId, EnumVariantId, |
21 | HasModule, ImplId, LocalModuleId, Lookup, ModuleDefId, ModuleId, StaticId, StructId, TraitId, | 22 | FunctionId, GenericDefId, HasModule, ImplId, LocalModuleId, Lookup, ModuleDefId, ModuleId, |
22 | TypeAliasId, TypeParamId, VariantId, | 23 | StaticId, StructId, TraitId, TypeAliasId, TypeParamId, VariantId, |
23 | }; | 24 | }; |
24 | 25 | ||
25 | #[derive(Debug, Clone, Default)] | 26 | #[derive(Debug, Clone, Default)] |
@@ -583,9 +584,18 @@ impl HasResolver for DefWithBodyId { | |||
583 | impl HasResolver for ContainerId { | 584 | impl HasResolver for ContainerId { |
584 | fn resolver(self, db: &impl DefDatabase) -> Resolver { | 585 | fn resolver(self, db: &impl DefDatabase) -> Resolver { |
585 | match self { | 586 | match self { |
586 | ContainerId::TraitId(it) => it.resolver(db), | ||
587 | ContainerId::ImplId(it) => it.resolver(db), | ||
588 | ContainerId::ModuleId(it) => it.resolver(db), | 587 | ContainerId::ModuleId(it) => it.resolver(db), |
588 | ContainerId::DefWithBodyId(it) => it.resolver(db), | ||
589 | } | ||
590 | } | ||
591 | } | ||
592 | |||
593 | impl HasResolver for AssocContainerId { | ||
594 | fn resolver(self, db: &impl DefDatabase) -> Resolver { | ||
595 | match self { | ||
596 | AssocContainerId::ContainerId(it) => it.resolver(db), | ||
597 | AssocContainerId::TraitId(it) => it.resolver(db), | ||
598 | AssocContainerId::ImplId(it) => it.resolver(db), | ||
589 | } | 599 | } |
590 | } | 600 | } |
591 | } | 601 | } |