diff options
author | Florian Diebold <[email protected]> | 2020-05-15 16:15:40 +0100 |
---|---|---|
committer | Florian Diebold <[email protected]> | 2020-05-15 16:25:28 +0100 |
commit | 3f42b2e837c4672a0fbe953e14ae2fd3fe6fc3b6 (patch) | |
tree | 481c93f91eec65f98a82fa28a123140d5a227eea /crates/ra_hir | |
parent | d51c1f62178c383363a2d95e865131d9a7b969d0 (diff) |
Handle `Self` in values and patterns
I.e.
- `Self(x)` or `Self` in tuple/unit struct impls
- `Self::Variant(x)` or `Self::Variant` in enum impls
- the same in patterns
Fixes #4454.
Diffstat (limited to 'crates/ra_hir')
-rw-r--r-- | crates/ra_hir/src/source_analyzer.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/crates/ra_hir/src/source_analyzer.rs b/crates/ra_hir/src/source_analyzer.rs index c63d1b847..c862a4f48 100644 --- a/crates/ra_hir/src/source_analyzer.rs +++ b/crates/ra_hir/src/source_analyzer.rs | |||
@@ -417,6 +417,7 @@ pub(crate) fn resolve_hir_path( | |||
417 | ValueNs::StaticId(it) => PathResolution::Def(Static::from(it).into()), | 417 | ValueNs::StaticId(it) => PathResolution::Def(Static::from(it).into()), |
418 | ValueNs::StructId(it) => PathResolution::Def(Struct::from(it).into()), | 418 | ValueNs::StructId(it) => PathResolution::Def(Struct::from(it).into()), |
419 | ValueNs::EnumVariantId(it) => PathResolution::Def(EnumVariant::from(it).into()), | 419 | ValueNs::EnumVariantId(it) => PathResolution::Def(EnumVariant::from(it).into()), |
420 | ValueNs::ImplSelf(impl_id) => PathResolution::SelfType(impl_id.into()), | ||
420 | }; | 421 | }; |
421 | Some(res) | 422 | Some(res) |
422 | }); | 423 | }); |