mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-26 20:09:19 +00:00
ide: show go to for function hover return type
This commit is contained in:
parent
64a73dcfba
commit
876f44b3ea
2 changed files with 32 additions and 28 deletions
|
@ -314,6 +314,7 @@ fn goto_type_action_for_def(db: &RootDatabase, def: Definition) -> Option<HoverA
|
|||
Definition::Local(it) => it.ty(db),
|
||||
Definition::GenericParam(hir::GenericParam::ConstParam(it)) => it.ty(db),
|
||||
Definition::Field(field) => field.ty(db),
|
||||
Definition::Function(function) => function.ret_type(db),
|
||||
_ => return None,
|
||||
};
|
||||
|
||||
|
|
|
@ -1750,6 +1750,9 @@ fn foo_$0test() {}
|
|||
cfg: None,
|
||||
},
|
||||
),
|
||||
GoToType(
|
||||
[],
|
||||
),
|
||||
]
|
||||
"#]],
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue