mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 14:51:48 +00:00
Support inferring Self
type in enum definitions
Signed-off-by: ice1000 <ice1000kotlin@foxmail.com>
This commit is contained in:
parent
c73193efe2
commit
6bad638928
7 changed files with 54 additions and 9 deletions
|
@ -216,7 +216,7 @@ impl SourceAnalyzer {
|
|||
let types = self.resolver.resolve_path_in_type_ns_fully(db, &path).map(|ty| match ty {
|
||||
TypeNs::SelfType(it) => PathResolution::SelfType(it),
|
||||
TypeNs::GenericParam(it) => PathResolution::GenericParam(it),
|
||||
TypeNs::Adt(it) => PathResolution::Def(it.into()),
|
||||
TypeNs::AdtSelfType(it) | TypeNs::Adt(it) => PathResolution::Def(it.into()),
|
||||
TypeNs::EnumVariant(it) => PathResolution::Def(it.into()),
|
||||
TypeNs::TypeAlias(it) => PathResolution::Def(it.into()),
|
||||
TypeNs::BuiltinType(it) => PathResolution::Def(it.into()),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue