diff options
Diffstat (limited to 'crates/ra_hir/src/resolve.rs')
-rw-r--r-- | crates/ra_hir/src/resolve.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_hir/src/resolve.rs b/crates/ra_hir/src/resolve.rs index 251945112..a77a9aeb1 100644 --- a/crates/ra_hir/src/resolve.rs +++ b/crates/ra_hir/src/resolve.rs | |||
@@ -15,7 +15,7 @@ use crate::{ | |||
15 | name::{Name, SELF_PARAM, SELF_TYPE}, | 15 | name::{Name, SELF_PARAM, SELF_TYPE}, |
16 | nameres::{CrateDefMap, CrateModuleId, PerNs}, | 16 | nameres::{CrateDefMap, CrateModuleId, PerNs}, |
17 | path::Path, | 17 | path::Path, |
18 | AdtDef, Enum, MacroDef, ModuleDef, Struct, Trait, | 18 | Adt, Enum, MacroDef, ModuleDef, Struct, Trait, |
19 | }; | 19 | }; |
20 | 20 | ||
21 | #[derive(Debug, Clone, Default)] | 21 | #[derive(Debug, Clone, Default)] |
@@ -143,7 +143,7 @@ impl Resolver { | |||
143 | ) -> Option<Struct> { | 143 | ) -> Option<Struct> { |
144 | let res = self.resolve_path_segments(db, path).into_fully_resolved().take_types()?; | 144 | let res = self.resolve_path_segments(db, path).into_fully_resolved().take_types()?; |
145 | match res { | 145 | match res { |
146 | Resolution::Def(ModuleDef::AdtDef(AdtDef::Struct(it))) => Some(it), | 146 | Resolution::Def(ModuleDef::Adt(Adt::Struct(it))) => Some(it), |
147 | _ => None, | 147 | _ => None, |
148 | } | 148 | } |
149 | } | 149 | } |
@@ -152,7 +152,7 @@ impl Resolver { | |||
152 | pub(crate) fn resolve_known_enum(&self, db: &impl HirDatabase, path: &Path) -> Option<Enum> { | 152 | pub(crate) fn resolve_known_enum(&self, db: &impl HirDatabase, path: &Path) -> Option<Enum> { |
153 | let res = self.resolve_path_segments(db, path).into_fully_resolved().take_types()?; | 153 | let res = self.resolve_path_segments(db, path).into_fully_resolved().take_types()?; |
154 | match res { | 154 | match res { |
155 | Resolution::Def(ModuleDef::AdtDef(AdtDef::Enum(it))) => Some(it), | 155 | Resolution::Def(ModuleDef::Adt(Adt::Enum(it))) => Some(it), |
156 | _ => None, | 156 | _ => None, |
157 | } | 157 | } |
158 | } | 158 | } |