diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-01-11 18:08:00 +0000 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-01-11 18:08:00 +0000 |
commit | 738c958a044361dc84a0f27e57b40f66a5815990 (patch) | |
tree | c57734dc82350c2d853f557a40f7aafdc7470bdf /crates/ra_ide_api/src/navigation_target.rs | |
parent | 2d3940d0ab862dbfaed4f4c844faaca6a38e31e9 (diff) | |
parent | f193fbcbae0783953cfaa88aaec6a8d4e1255007 (diff) |
Merge #498
498: actually produce missing def kinds r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_ide_api/src/navigation_target.rs')
-rw-r--r-- | crates/ra_ide_api/src/navigation_target.rs | 16 |
1 files changed, 16 insertions, 0 deletions
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 { | |||
108 | let (file_id, node) = f.source(db)?; | 108 | let (file_id, node) = f.source(db)?; |
109 | NavigationTarget::from_named(file_id.original_file(db), &*node) | 109 | NavigationTarget::from_named(file_id.original_file(db), &*node) |
110 | } | 110 | } |
111 | Def::Trait(f) => { | ||
112 | let (file_id, node) = f.source(db)?; | ||
113 | NavigationTarget::from_named(file_id.original_file(db), &*node) | ||
114 | } | ||
115 | Def::Type(f) => { | ||
116 | let (file_id, node) = f.source(db)?; | ||
117 | NavigationTarget::from_named(file_id.original_file(db), &*node) | ||
118 | } | ||
119 | Def::Static(f) => { | ||
120 | let (file_id, node) = f.source(db)?; | ||
121 | NavigationTarget::from_named(file_id.original_file(db), &*node) | ||
122 | } | ||
123 | Def::Const(f) => { | ||
124 | let (file_id, node) = f.source(db)?; | ||
125 | NavigationTarget::from_named(file_id.original_file(db), &*node) | ||
126 | } | ||
111 | Def::Module(m) => NavigationTarget::from_module(db, m)?, | 127 | Def::Module(m) => NavigationTarget::from_module(db, m)?, |
112 | Def::Item => return Ok(None), | 128 | Def::Item => return Ok(None), |
113 | }; | 129 | }; |