mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-11-19 03:28:36 +00:00
Cleanup assoc_type_shorthand_candidates
This commit is contained in:
parent
aa890b49ff
commit
496f5f9e96
3 changed files with 13 additions and 14 deletions
|
|
@ -140,9 +140,8 @@ pub(crate) fn complete_expr_path(
|
|||
Qualified::With { resolution: None, .. } => {}
|
||||
Qualified::With { resolution: Some(resolution), .. } => {
|
||||
// Add associated types on type parameters and `Self`.
|
||||
ctx.scope.assoc_type_shorthand_candidates(resolution, |_, alias| {
|
||||
ctx.scope.assoc_type_shorthand_candidates(resolution, |alias| {
|
||||
acc.add_type_alias(ctx, alias);
|
||||
None::<()>
|
||||
});
|
||||
match resolution {
|
||||
hir::PathResolution::Def(hir::ModuleDef::Module(module)) => {
|
||||
|
|
|
|||
|
|
@ -77,9 +77,8 @@ pub(crate) fn complete_type_path(
|
|||
Qualified::With { resolution: None, .. } => {}
|
||||
Qualified::With { resolution: Some(resolution), .. } => {
|
||||
// Add associated types on type parameters and `Self`.
|
||||
ctx.scope.assoc_type_shorthand_candidates(resolution, |_, alias| {
|
||||
ctx.scope.assoc_type_shorthand_candidates(resolution, |alias| {
|
||||
acc.add_type_alias(ctx, alias);
|
||||
None::<()>
|
||||
});
|
||||
|
||||
match resolution {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue