From f193fbcbae0783953cfaa88aaec6a8d4e1255007 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 11 Jan 2019 21:02:12 +0300 Subject: actually produce missing def kinds --- crates/ra_ide_api/src/navigation_target.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'crates/ra_ide_api/src/navigation_target.rs') diff --git a/crates/ra_ide_api/src/navigation_target.rs b/crates/ra_ide_api/src/navigation_target.rs index b955bbe42..b0d0a3e8b 100644 --- a/crates/ra_ide_api/src/navigation_target.rs +++ b/crates/ra_ide_api/src/navigation_target.rs @@ -108,6 +108,22 @@ impl NavigationTarget { let (file_id, node) = f.source(db)?; NavigationTarget::from_named(file_id.original_file(db), &*node) } + Def::Trait(f) => { + let (file_id, node) = f.source(db)?; + NavigationTarget::from_named(file_id.original_file(db), &*node) + } + Def::Type(f) => { + let (file_id, node) = f.source(db)?; + NavigationTarget::from_named(file_id.original_file(db), &*node) + } + Def::Static(f) => { + let (file_id, node) = f.source(db)?; + NavigationTarget::from_named(file_id.original_file(db), &*node) + } + Def::Const(f) => { + let (file_id, node) = f.source(db)?; + NavigationTarget::from_named(file_id.original_file(db), &*node) + } Def::Module(m) => NavigationTarget::from_module(db, m)?, Def::Item => return Ok(None), }; -- cgit v1.2.3