aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src/display
diff options
context:
space:
mode:
authorvsrs <[email protected]>2020-06-10 19:24:36 +0100
committervsrs <[email protected]>2020-06-18 08:15:43 +0100
commitc50157f33025b6ff01809b975a3d12c0e43a0072 (patch)
tree2b40e6ee3cbb463000432c760311b8a2a1a3292c /crates/ra_ide/src/display
parent4d6c6a6b1e00f61af96e16386c7f03f83f96a173 (diff)
Add `Go to Type Definition` hover action.
Diffstat (limited to 'crates/ra_ide/src/display')
-rw-r--r--crates/ra_ide/src/display/navigation_target.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/crates/ra_ide/src/display/navigation_target.rs b/crates/ra_ide/src/display/navigation_target.rs
index c7bb1e69f..325b247bb 100644
--- a/crates/ra_ide/src/display/navigation_target.rs
+++ b/crates/ra_ide/src/display/navigation_target.rs
@@ -321,6 +321,15 @@ impl ToNav for hir::Adt {
321 } 321 }
322} 322}
323 323
324impl ToNav for hir::AdtOrTrait {
325 fn to_nav(&self, db: &RootDatabase) -> NavigationTarget {
326 match self {
327 hir::AdtOrTrait::Adt(adt) => adt.to_nav(db),
328 hir::AdtOrTrait::Trait(trait_) => trait_.to_nav(db),
329 }
330 }
331}
332
324impl ToNav for hir::AssocItem { 333impl ToNav for hir::AssocItem {
325 fn to_nav(&self, db: &RootDatabase) -> NavigationTarget { 334 fn to_nav(&self, db: &RootDatabase) -> NavigationTarget {
326 match self { 335 match self {