diff options
Diffstat (limited to 'crates/ra_analysis/src/imp.rs')
-rw-r--r-- | crates/ra_analysis/src/imp.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_analysis/src/imp.rs b/crates/ra_analysis/src/imp.rs index 836fb89f5..b513736bb 100644 --- a/crates/ra_analysis/src/imp.rs +++ b/crates/ra_analysis/src/imp.rs | |||
@@ -205,7 +205,7 @@ impl AnalysisImpl { | |||
205 | 205 | ||
206 | /// This returns `Vec` because a module may be included from several places. We | 206 | /// This returns `Vec` because a module may be included from several places. We |
207 | /// don't handle this case yet though, so the Vec has length at most one. | 207 | /// don't handle this case yet though, so the Vec has length at most one. |
208 | pub fn parent_module(&self, position: FilePosition) -> Cancelable<Vec<(FileId, FileSymbol)>> { | 208 | pub fn parent_module(&self, position: FilePosition) -> Cancelable<Vec<NavigationTarget>> { |
209 | let descr = match source_binder::module_from_position(&*self.db, position)? { | 209 | let descr = match source_binder::module_from_position(&*self.db, position)? { |
210 | None => return Ok(Vec::new()), | 210 | None => return Ok(Vec::new()), |
211 | Some(it) => it, | 211 | Some(it) => it, |
@@ -216,12 +216,12 @@ impl AnalysisImpl { | |||
216 | }; | 216 | }; |
217 | let decl = decl.borrowed(); | 217 | let decl = decl.borrowed(); |
218 | let decl_name = decl.name().unwrap(); | 218 | let decl_name = decl.name().unwrap(); |
219 | let sym = FileSymbol { | 219 | let symbol = FileSymbol { |
220 | name: decl_name.text(), | 220 | name: decl_name.text(), |
221 | node_range: decl_name.syntax().range(), | 221 | node_range: decl_name.syntax().range(), |
222 | kind: MODULE, | 222 | kind: MODULE, |
223 | }; | 223 | }; |
224 | Ok(vec![(file_id, sym)]) | 224 | Ok(vec![NavigationTarget { file_id, symbol }]) |
225 | } | 225 | } |
226 | /// Returns `Vec` for the same reason as `parent_module` | 226 | /// Returns `Vec` for the same reason as `parent_module` |
227 | pub fn crate_for(&self, file_id: FileId) -> Cancelable<Vec<CrateId>> { | 227 | pub fn crate_for(&self, file_id: FileId) -> Cancelable<Vec<CrateId>> { |