diff options
Diffstat (limited to 'crates/hir/src/semantics.rs')
-rw-r--r-- | crates/hir/src/semantics.rs | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/crates/hir/src/semantics.rs b/crates/hir/src/semantics.rs index 613266e07..43162797e 100644 --- a/crates/hir/src/semantics.rs +++ b/crates/hir/src/semantics.rs | |||
@@ -51,12 +51,14 @@ impl PathResolution { | |||
51 | PathResolution::Def(ModuleDef::BuiltinType(builtin)) => { | 51 | PathResolution::Def(ModuleDef::BuiltinType(builtin)) => { |
52 | Some(TypeNs::BuiltinType((*builtin).into())) | 52 | Some(TypeNs::BuiltinType((*builtin).into())) |
53 | } | 53 | } |
54 | PathResolution::Def(ModuleDef::Const(_)) | 54 | PathResolution::Def( |
55 | | PathResolution::Def(ModuleDef::Variant(_)) | 55 | ModuleDef::Const(_) |
56 | | PathResolution::Def(ModuleDef::Function(_)) | 56 | | ModuleDef::Variant(_) |
57 | | PathResolution::Def(ModuleDef::Module(_)) | 57 | | ModuleDef::Function(_) |
58 | | PathResolution::Def(ModuleDef::Static(_)) | 58 | | ModuleDef::Module(_) |
59 | | PathResolution::Def(ModuleDef::Trait(_)) => None, | 59 | | ModuleDef::Static(_) |
60 | | ModuleDef::Trait(_), | ||
61 | ) => None, | ||
60 | PathResolution::Def(ModuleDef::TypeAlias(alias)) => { | 62 | PathResolution::Def(ModuleDef::TypeAlias(alias)) => { |
61 | Some(TypeNs::TypeAliasId((*alias).into())) | 63 | Some(TypeNs::TypeAliasId((*alias).into())) |
62 | } | 64 | } |
@@ -65,8 +67,7 @@ impl PathResolution { | |||
65 | } | 67 | } |
66 | PathResolution::TypeParam(param) => Some(TypeNs::GenericParam((*param).into())), | 68 | PathResolution::TypeParam(param) => Some(TypeNs::GenericParam((*param).into())), |
67 | PathResolution::SelfType(impl_def) => Some(TypeNs::SelfType((*impl_def).into())), | 69 | PathResolution::SelfType(impl_def) => Some(TypeNs::SelfType((*impl_def).into())), |
68 | PathResolution::AssocItem(AssocItem::Const(_)) | 70 | PathResolution::AssocItem(AssocItem::Const(_) | AssocItem::Function(_)) => None, |
69 | | PathResolution::AssocItem(AssocItem::Function(_)) => None, | ||
70 | PathResolution::AssocItem(AssocItem::TypeAlias(alias)) => { | 71 | PathResolution::AssocItem(AssocItem::TypeAlias(alias)) => { |
71 | Some(TypeNs::TypeAliasId((*alias).into())) | 72 | Some(TypeNs::TypeAliasId((*alias).into())) |
72 | } | 73 | } |