mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 05:15:04 +00:00
fix: Resolve generic parameters within use captures
This commit is contained in:
parent
7f39ee3fce
commit
d6b62265b5
5 changed files with 90 additions and 2 deletions
|
@ -733,6 +733,12 @@ impl NameRefClass {
|
|||
}
|
||||
None
|
||||
},
|
||||
ast::UseBoundGenericArgs(_) => {
|
||||
sema.resolve_use_type_arg(name_ref)
|
||||
.map(GenericParam::TypeParam)
|
||||
.map(Definition::GenericParam)
|
||||
.map(NameRefClass::Definition)
|
||||
},
|
||||
ast::ExternCrate(extern_crate_ast) => {
|
||||
let extern_crate = sema.to_def(&extern_crate_ast)?;
|
||||
let krate = extern_crate.resolved_crate(sema.db)?;
|
||||
|
@ -764,6 +770,7 @@ impl NameRefClass {
|
|||
sema.resolve_label(lifetime).map(Definition::Label).map(NameRefClass::Definition)
|
||||
}
|
||||
SyntaxKind::LIFETIME_ARG
|
||||
| SyntaxKind::USE_BOUND_GENERIC_ARGS
|
||||
| SyntaxKind::SELF_PARAM
|
||||
| SyntaxKind::TYPE_BOUND
|
||||
| SyntaxKind::WHERE_PRED
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue