From 45117c63884366ee82102a782a62a09fefff746b Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 13 Sep 2019 00:10:16 +0300 Subject: make various enums "inherit" from AdtDef --- crates/ra_hir/src/nameres.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'crates/ra_hir/src/nameres.rs') diff --git a/crates/ra_hir/src/nameres.rs b/crates/ra_hir/src/nameres.rs index 3d8691f53..1efaad4bc 100644 --- a/crates/ra_hir/src/nameres.rs +++ b/crates/ra_hir/src/nameres.rs @@ -69,7 +69,8 @@ use crate::{ diagnostics::DiagnosticSink, ids::MacroDefId, nameres::diagnostics::DefDiagnostic, - AstId, BuiltinType, Crate, HirFileId, MacroDef, Module, ModuleDef, Name, Path, PathKind, Trait, + AdtDef, AstId, BuiltinType, Crate, HirFileId, MacroDef, Module, ModuleDef, Name, Path, + PathKind, Trait, }; pub(crate) use self::raw::{ImportSourceMap, RawItems}; @@ -425,7 +426,7 @@ impl CrateDefMap { } } } - ModuleDef::Enum(e) => { + ModuleDef::AdtDef(AdtDef::Enum(e)) => { // enum variant tested_by!(can_import_enum_variant); match e.variant(db, &segment.name) { -- cgit v1.2.3 From 114a1b878e95c20490af574550ea0825b7a8f9d1 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 13 Sep 2019 00:34:52 +0300 Subject: rename AdtDef -> Adt --- crates/ra_hir/src/nameres.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'crates/ra_hir/src/nameres.rs') diff --git a/crates/ra_hir/src/nameres.rs b/crates/ra_hir/src/nameres.rs index 1efaad4bc..3a3bf6b5f 100644 --- a/crates/ra_hir/src/nameres.rs +++ b/crates/ra_hir/src/nameres.rs @@ -69,8 +69,8 @@ use crate::{ diagnostics::DiagnosticSink, ids::MacroDefId, nameres::diagnostics::DefDiagnostic, - AdtDef, AstId, BuiltinType, Crate, HirFileId, MacroDef, Module, ModuleDef, Name, Path, - PathKind, Trait, + Adt, AstId, BuiltinType, Crate, HirFileId, MacroDef, Module, ModuleDef, Name, Path, PathKind, + Trait, }; pub(crate) use self::raw::{ImportSourceMap, RawItems}; @@ -426,7 +426,7 @@ impl CrateDefMap { } } } - ModuleDef::AdtDef(AdtDef::Enum(e)) => { + ModuleDef::Adt(Adt::Enum(e)) => { // enum variant tested_by!(can_import_enum_variant); match e.variant(db, &segment.name) { -- cgit v1.2.3