mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 22:31:43 +00:00
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.
This commit is contained in:
parent
d51c1f6217
commit
3f42b2e837
6 changed files with 197 additions and 19 deletions
|
@ -417,6 +417,7 @@ pub(crate) fn resolve_hir_path(
|
|||
ValueNs::StaticId(it) => PathResolution::Def(Static::from(it).into()),
|
||||
ValueNs::StructId(it) => PathResolution::Def(Struct::from(it).into()),
|
||||
ValueNs::EnumVariantId(it) => PathResolution::Def(EnumVariant::from(it).into()),
|
||||
ValueNs::ImplSelf(impl_id) => PathResolution::SelfType(impl_id.into()),
|
||||
};
|
||||
Some(res)
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue