diff options
author | Aleksey Kladov <[email protected]> | 2019-09-12 22:10:16 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-09-12 22:10:16 +0100 |
commit | 45117c63884366ee82102a782a62a09fefff746b (patch) | |
tree | b66d9ca105e39b96b78bf7f3659d1858577a2c8c /crates/ra_hir/src/nameres | |
parent | d8b621cf26b59ff5ae9379b50fc822590b6a3a4e (diff) |
make various enums "inherit" from AdtDef
Diffstat (limited to 'crates/ra_hir/src/nameres')
-rw-r--r-- | crates/ra_hir/src/nameres/collector.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_hir/src/nameres/collector.rs b/crates/ra_hir/src/nameres/collector.rs index 03fbbd33f..ced1ebf1e 100644 --- a/crates/ra_hir/src/nameres/collector.rs +++ b/crates/ra_hir/src/nameres/collector.rs | |||
@@ -13,8 +13,8 @@ use crate::{ | |||
13 | raw, Crate, CrateDefMap, CrateModuleId, ModuleData, ModuleDef, PerNs, ReachedFixedPoint, | 13 | raw, Crate, CrateDefMap, CrateModuleId, ModuleData, ModuleDef, PerNs, ReachedFixedPoint, |
14 | Resolution, ResolveMode, | 14 | Resolution, ResolveMode, |
15 | }, | 15 | }, |
16 | AstId, Const, Enum, Function, HirFileId, MacroDef, Module, Name, Path, PathKind, Static, | 16 | AdtDef, AstId, Const, Enum, Function, HirFileId, MacroDef, Module, Name, Path, PathKind, |
17 | Struct, Trait, TypeAlias, Union, | 17 | Static, Struct, Trait, TypeAlias, Union, |
18 | }; | 18 | }; |
19 | 19 | ||
20 | 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 { |
@@ -314,7 +314,7 @@ where | |||
314 | .push((module_id, import_id)); | 314 | .push((module_id, import_id)); |
315 | } | 315 | } |
316 | } | 316 | } |
317 | Some(ModuleDef::Enum(e)) => { | 317 | Some(ModuleDef::AdtDef(AdtDef::Enum(e))) => { |
318 | tested_by!(glob_enum); | 318 | tested_by!(glob_enum); |
319 | // glob import from enum => just import all the variants | 319 | // glob import from enum => just import all the variants |
320 | let variants = e.variants(self.db); | 320 | let variants = e.variants(self.db); |