diff options
Diffstat (limited to 'crates/ra_ide/src/display')
-rw-r--r-- | crates/ra_ide/src/display/navigation_target.rs | 9 |
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 | ||
324 | impl 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 | |||
324 | impl ToNav for hir::AssocItem { | 333 | impl 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 { |