@@ -429,7 +429,7 @@ pub(crate) fn hover_for_definition(
429
429
& notable_traits,
430
430
macro_arm,
431
431
hovered_definition,
432
- subst_types,
432
+ subst_types. as_ref ( ) ,
433
433
config,
434
434
edition,
435
435
) ;
@@ -439,7 +439,7 @@ pub(crate) fn hover_for_definition(
439
439
show_fn_references_action ( sema. db , def) ,
440
440
show_implementations_action ( sema. db , def) ,
441
441
runnable_action ( sema, def, file_id) ,
442
- goto_type_action_for_def ( sema. db , def, & notable_traits, edition) ,
442
+ goto_type_action_for_def ( sema. db , def, & notable_traits, subst_types , edition) ,
443
443
]
444
444
. into_iter ( )
445
445
. flatten ( )
@@ -531,6 +531,7 @@ fn goto_type_action_for_def(
531
531
db : & RootDatabase ,
532
532
def : Definition ,
533
533
notable_traits : & [ ( hir:: Trait , Vec < ( Option < hir:: Type > , hir:: Name ) > ) ] ,
534
+ subst_types : Option < Vec < ( hir:: Symbol , hir:: Type ) > > ,
534
535
edition : Edition ,
535
536
) -> Option < HoverAction > {
536
537
let mut targets: Vec < hir:: ModuleDef > = Vec :: new ( ) ;
@@ -568,6 +569,12 @@ fn goto_type_action_for_def(
568
569
walk_and_push_ty ( db, & ty, & mut push_new_def) ;
569
570
}
570
571
572
+ if let Some ( subst_types) = subst_types {
573
+ for ( _, ty) in subst_types {
574
+ walk_and_push_ty ( db, & ty, & mut push_new_def) ;
575
+ }
576
+ }
577
+
571
578
HoverAction :: goto_type_from_targets ( db, targets, edition)
572
579
}
573
580
0 commit comments