diff options
Diffstat (limited to 'crates/ra_hir/src/source_binder.rs')
-rw-r--r-- | crates/ra_hir/src/source_binder.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/crates/ra_hir/src/source_binder.rs b/crates/ra_hir/src/source_binder.rs index 2957e496c..b80aaeb90 100644 --- a/crates/ra_hir/src/source_binder.rs +++ b/crates/ra_hir/src/source_binder.rs | |||
@@ -36,8 +36,8 @@ use crate::{ | |||
36 | method_resolution::{self, implements_trait}, | 36 | method_resolution::{self, implements_trait}, |
37 | InEnvironment, TraitEnvironment, Ty, | 37 | InEnvironment, TraitEnvironment, Ty, |
38 | }, | 38 | }, |
39 | Adt, AssocItem, Const, DefWithBody, Enum, EnumVariant, FromSource, Function, GenericParam, | 39 | Adt, AssocItem, Const, DefWithBody, Enum, EnumVariant, FromSource, Function, ImplBlock, Local, |
40 | ImplBlock, Local, MacroDef, Name, Path, ScopeDef, Static, Struct, Trait, Type, TypeAlias, | 40 | MacroDef, Name, Path, ScopeDef, Static, Struct, Trait, Type, TypeAlias, TypeParam, |
41 | }; | 41 | }; |
42 | 42 | ||
43 | fn try_get_resolver_for_node(db: &impl HirDatabase, node: InFile<&SyntaxNode>) -> Option<Resolver> { | 43 | fn try_get_resolver_for_node(db: &impl HirDatabase, node: InFile<&SyntaxNode>) -> Option<Resolver> { |
@@ -112,7 +112,7 @@ pub enum PathResolution { | |||
112 | /// A local binding (only value namespace) | 112 | /// A local binding (only value namespace) |
113 | Local(Local), | 113 | Local(Local), |
114 | /// A generic parameter | 114 | /// A generic parameter |
115 | GenericParam(GenericParam), | 115 | TypeParam(TypeParam), |
116 | SelfType(crate::ImplBlock), | 116 | SelfType(crate::ImplBlock), |
117 | Macro(MacroDef), | 117 | Macro(MacroDef), |
118 | AssocItem(crate::AssocItem), | 118 | AssocItem(crate::AssocItem), |
@@ -266,7 +266,7 @@ impl SourceAnalyzer { | |||
266 | ) -> Option<PathResolution> { | 266 | ) -> Option<PathResolution> { |
267 | let types = self.resolver.resolve_path_in_type_ns_fully(db, &path).map(|ty| match ty { | 267 | let types = self.resolver.resolve_path_in_type_ns_fully(db, &path).map(|ty| match ty { |
268 | TypeNs::SelfType(it) => PathResolution::SelfType(it.into()), | 268 | TypeNs::SelfType(it) => PathResolution::SelfType(it.into()), |
269 | TypeNs::GenericParam(id) => PathResolution::GenericParam(GenericParam { id }), | 269 | TypeNs::GenericParam(id) => PathResolution::TypeParam(TypeParam { id }), |
270 | TypeNs::AdtSelfType(it) | TypeNs::AdtId(it) => { | 270 | TypeNs::AdtSelfType(it) | TypeNs::AdtId(it) => { |
271 | PathResolution::Def(Adt::from(it).into()) | 271 | PathResolution::Def(Adt::from(it).into()) |
272 | } | 272 | } |
@@ -338,7 +338,7 @@ impl SourceAnalyzer { | |||
338 | resolver::ScopeDef::PerNs(it) => it.into(), | 338 | resolver::ScopeDef::PerNs(it) => it.into(), |
339 | resolver::ScopeDef::ImplSelfType(it) => ScopeDef::ImplSelfType(it.into()), | 339 | resolver::ScopeDef::ImplSelfType(it) => ScopeDef::ImplSelfType(it.into()), |
340 | resolver::ScopeDef::AdtSelfType(it) => ScopeDef::AdtSelfType(it.into()), | 340 | resolver::ScopeDef::AdtSelfType(it) => ScopeDef::AdtSelfType(it.into()), |
341 | resolver::ScopeDef::GenericParam(id) => ScopeDef::GenericParam(GenericParam { id }), | 341 | resolver::ScopeDef::GenericParam(id) => ScopeDef::GenericParam(TypeParam { id }), |
342 | resolver::ScopeDef::Local(pat_id) => { | 342 | resolver::ScopeDef::Local(pat_id) => { |
343 | let parent = self.resolver.body_owner().unwrap().into(); | 343 | let parent = self.resolver.body_owner().unwrap().into(); |
344 | ScopeDef::Local(Local { parent, pat_id }) | 344 | ScopeDef::Local(Local { parent, pat_id }) |