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, 2 insertions, 8 deletions
diff --git a/crates/ra_hir/src/source_binder.rs b/crates/ra_hir/src/source_binder.rs index 0e136b904..8c4b635d2 100644 --- a/crates/ra_hir/src/source_binder.rs +++ b/crates/ra_hir/src/source_binder.rs | |||
@@ -262,10 +262,7 @@ impl SourceAnalyzer { | |||
262 | ) -> Option<PathResolution> { | 262 | ) -> Option<PathResolution> { |
263 | let types = self.resolver.resolve_path_in_type_ns_fully(db, &path).map(|ty| match ty { | 263 | let types = self.resolver.resolve_path_in_type_ns_fully(db, &path).map(|ty| match ty { |
264 | TypeNs::SelfType(it) => PathResolution::SelfType(it.into()), | 264 | TypeNs::SelfType(it) => PathResolution::SelfType(it.into()), |
265 | TypeNs::GenericParam(idx) => PathResolution::GenericParam(GenericParam { | 265 | TypeNs::GenericParam(id) => PathResolution::GenericParam(GenericParam { id }), |
266 | parent: self.resolver.generic_def().unwrap(), | ||
267 | idx, | ||
268 | }), | ||
269 | TypeNs::AdtSelfType(it) | TypeNs::AdtId(it) => { | 266 | TypeNs::AdtSelfType(it) | TypeNs::AdtId(it) => { |
270 | PathResolution::Def(Adt::from(it).into()) | 267 | PathResolution::Def(Adt::from(it).into()) |
271 | } | 268 | } |
@@ -337,10 +334,7 @@ impl SourceAnalyzer { | |||
337 | resolver::ScopeDef::PerNs(it) => it.into(), | 334 | resolver::ScopeDef::PerNs(it) => it.into(), |
338 | resolver::ScopeDef::ImplSelfType(it) => ScopeDef::ImplSelfType(it.into()), | 335 | resolver::ScopeDef::ImplSelfType(it) => ScopeDef::ImplSelfType(it.into()), |
339 | resolver::ScopeDef::AdtSelfType(it) => ScopeDef::AdtSelfType(it.into()), | 336 | resolver::ScopeDef::AdtSelfType(it) => ScopeDef::AdtSelfType(it.into()), |
340 | resolver::ScopeDef::GenericParam(idx) => { | 337 | resolver::ScopeDef::GenericParam(id) => ScopeDef::GenericParam(GenericParam { id }), |
341 | let parent = self.resolver.generic_def().unwrap(); | ||
342 | ScopeDef::GenericParam(GenericParam { parent, idx }) | ||
343 | } | ||
344 | resolver::ScopeDef::Local(pat_id) => { | 338 | resolver::ScopeDef::Local(pat_id) => { |
345 | let parent = self.resolver.body_owner().unwrap().into(); | 339 | let parent = self.resolver.body_owner().unwrap().into(); |
346 | ScopeDef::Local(Local { parent, pat_id }) | 340 | ScopeDef::Local(Local { parent, pat_id }) |