@@ -429,7 +429,7 @@ pub(crate) fn hover_for_definition(
429429 & notable_traits,
430430 macro_arm,
431431 hovered_definition,
432- subst_types,
432+ subst_types. as_ref ( ) ,
433433 config,
434434 edition,
435435 ) ;
@@ -439,7 +439,7 @@ pub(crate) fn hover_for_definition(
439439 show_fn_references_action ( sema. db , def) ,
440440 show_implementations_action ( sema. db , def) ,
441441 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) ,
443443 ]
444444 . into_iter ( )
445445 . flatten ( )
@@ -531,6 +531,7 @@ fn goto_type_action_for_def(
531531 db : & RootDatabase ,
532532 def : Definition ,
533533 notable_traits : & [ ( hir:: Trait , Vec < ( Option < hir:: Type > , hir:: Name ) > ) ] ,
534+ subst_types : Option < Vec < ( hir:: Symbol , hir:: Type ) > > ,
534535 edition : Edition ,
535536) -> Option < HoverAction > {
536537 let mut targets: Vec < hir:: ModuleDef > = Vec :: new ( ) ;
@@ -568,6 +569,12 @@ fn goto_type_action_for_def(
568569 walk_and_push_ty ( db, & ty, & mut push_new_def) ;
569570 }
570571
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+
571578 HoverAction :: goto_type_from_targets ( db, targets, edition)
572579}
573580
0 commit comments