diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-05-15 21:25:42 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-05-15 21:25:42 +0100 |
commit | cffa70be01d4353184f874fc4768b692e255dd30 (patch) | |
tree | 481c93f91eec65f98a82fa28a123140d5a227eea /crates/ra_hir/src | |
parent | d51c1f62178c383363a2d95e865131d9a7b969d0 (diff) | |
parent | 3f42b2e837c4672a0fbe953e14ae2fd3fe6fc3b6 (diff) |
Merge #4470
4470: Handle `Self` in values and patterns r=matklad a=flodiebold
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.
Co-authored-by: Florian Diebold <[email protected]>
Diffstat (limited to 'crates/ra_hir/src')
-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 | }); |