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(
557
557
. into_iter ( )
558
558
. filter ( |& it| Some ( it. into ( ) ) != sized_trait)
559
559
. 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
+ }
560
565
} else {
561
566
let ty = match def {
562
567
Definition :: Local ( it) => it. ty ( db) ,
563
568
Definition :: GenericParam ( hir:: GenericParam :: ConstParam ( it) ) => it. ty ( db) ,
564
569
Definition :: Field ( field) => field. ty ( db) ,
565
- Definition :: Function ( function) => function. ret_type ( db) ,
566
570
_ => return HoverAction :: goto_type_from_targets ( db, targets, edition) ,
567
571
} ;
568
572
You can’t perform that action at this time.
0 commit comments