diff options
-rw-r--r-- | crates/ra_hir/src/semantics.rs | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/crates/ra_hir/src/semantics.rs b/crates/ra_hir/src/semantics.rs index 2f42f877c..75ab2373e 100644 --- a/crates/ra_hir/src/semantics.rs +++ b/crates/ra_hir/src/semantics.rs | |||
@@ -49,21 +49,20 @@ impl PathResolution { | |||
49 | PathResolution::Def(ModuleDef::BuiltinType(builtin)) => { | 49 | PathResolution::Def(ModuleDef::BuiltinType(builtin)) => { |
50 | Some(TypeNs::BuiltinType(*builtin)) | 50 | Some(TypeNs::BuiltinType(*builtin)) |
51 | } | 51 | } |
52 | PathResolution::Def(ModuleDef::Const(_)) => None, | 52 | PathResolution::Def(ModuleDef::Const(_)) |
53 | PathResolution::Def(ModuleDef::EnumVariant(_)) => None, | 53 | | PathResolution::Def(ModuleDef::EnumVariant(_)) |
54 | PathResolution::Def(ModuleDef::Function(_)) => None, | 54 | | PathResolution::Def(ModuleDef::Function(_)) |
55 | PathResolution::Def(ModuleDef::Module(_)) => None, | 55 | | PathResolution::Def(ModuleDef::Module(_)) |
56 | PathResolution::Def(ModuleDef::Static(_)) => None, | 56 | | PathResolution::Def(ModuleDef::Static(_)) |
57 | PathResolution::Def(ModuleDef::Trait(_)) => None, | 57 | | PathResolution::Def(ModuleDef::Trait(_)) => None, |
58 | PathResolution::Def(ModuleDef::TypeAlias(alias)) => { | 58 | PathResolution::Def(ModuleDef::TypeAlias(alias)) => { |
59 | Some(TypeNs::TypeAliasId((*alias).into())) | 59 | Some(TypeNs::TypeAliasId((*alias).into())) |
60 | } | 60 | } |
61 | PathResolution::Local(_) => None, | 61 | PathResolution::Local(_) | PathResolution::Macro(_) => None, |
62 | PathResolution::TypeParam(param) => Some(TypeNs::GenericParam((*param).into())), | 62 | PathResolution::TypeParam(param) => Some(TypeNs::GenericParam((*param).into())), |
63 | PathResolution::SelfType(impl_def) => Some(TypeNs::SelfType((*impl_def).into())), | 63 | PathResolution::SelfType(impl_def) => Some(TypeNs::SelfType((*impl_def).into())), |
64 | PathResolution::Macro(_) => None, | 64 | PathResolution::AssocItem(AssocItem::Const(_)) |
65 | PathResolution::AssocItem(AssocItem::Const(_)) => None, | 65 | | PathResolution::AssocItem(AssocItem::Function(_)) => None, |
66 | PathResolution::AssocItem(AssocItem::Function(_)) => None, | ||
67 | PathResolution::AssocItem(AssocItem::TypeAlias(alias)) => { | 66 | PathResolution::AssocItem(AssocItem::TypeAlias(alias)) => { |
68 | Some(TypeNs::TypeAliasId((*alias).into())) | 67 | Some(TypeNs::TypeAliasId((*alias).into())) |
69 | } | 68 | } |