File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
src/tools/rust-analyzer/crates/ide/src Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -557,12 +557,16 @@ fn goto_type_action_for_def(
557557 . into_iter ( )
558558 . filter ( |& it| Some ( it. into ( ) ) != sized_trait)
559559 . for_each ( |it| push_new_def ( it. into ( ) ) ) ;
560+ } else if let Definition :: Function ( function) = def {
561+ walk_and_push_ty ( db, & function. ret_type ( db) , & mut push_new_def) ;
562+ for param in function. params_without_self ( db) {
563+ walk_and_push_ty ( db, param. ty ( ) , & mut push_new_def) ;
564+ }
560565 } else {
561566 let ty = match def {
562567 Definition :: Local ( it) => it. ty ( db) ,
563568 Definition :: GenericParam ( hir:: GenericParam :: ConstParam ( it) ) => it. ty ( db) ,
564569 Definition :: Field ( field) => field. ty ( db) ,
565- Definition :: Function ( function) => function. ret_type ( db) ,
566570 _ => return HoverAction :: goto_type_from_targets ( db, targets, edition) ,
567571 } ;
568572
You can’t perform that action at this time.
0 commit comments