diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-01-02 17:13:06 +0000 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-01-02 17:13:06 +0000 |
commit | 54efd8204ec05313007d42351fe4701061b06a67 (patch) | |
tree | 1dc7bdb2cf040843dd552661bfc2225e3679eb5a /crates/ra_analysis/src/lib.rs | |
parent | 4f30c459336e948790910e268d8f751b95815ac2 (diff) | |
parent | 28f6eedba59d3a5dd43fe6fbde3d19d54d0e2f9d (diff) |
Merge #407
407: run r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_analysis/src/lib.rs')
-rw-r--r-- | crates/ra_analysis/src/lib.rs | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/crates/ra_analysis/src/lib.rs b/crates/ra_analysis/src/lib.rs index 54eb2f4d3..a01febf4e 100644 --- a/crates/ra_analysis/src/lib.rs +++ b/crates/ra_analysis/src/lib.rs | |||
@@ -382,10 +382,6 @@ impl Analysis { | |||
382 | pub fn parent_module(&self, position: FilePosition) -> Cancelable<Vec<NavigationTarget>> { | 382 | pub fn parent_module(&self, position: FilePosition) -> Cancelable<Vec<NavigationTarget>> { |
383 | self.db.parent_module(position) | 383 | self.db.parent_module(position) |
384 | } | 384 | } |
385 | /// Returns `::` separated path to the current module from the crate root. | ||
386 | pub fn module_path(&self, position: FilePosition) -> Cancelable<Option<String>> { | ||
387 | self.db.module_path(position) | ||
388 | } | ||
389 | /// Returns crates this file belongs too. | 385 | /// Returns crates this file belongs too. |
390 | pub fn crate_for(&self, file_id: FileId) -> Cancelable<Vec<CrateId>> { | 386 | pub fn crate_for(&self, file_id: FileId) -> Cancelable<Vec<CrateId>> { |
391 | self.db.crate_for(file_id) | 387 | self.db.crate_for(file_id) |
@@ -396,8 +392,7 @@ impl Analysis { | |||
396 | } | 392 | } |
397 | /// Returns the set of possible targets to run for the current file. | 393 | /// Returns the set of possible targets to run for the current file. |
398 | pub fn runnables(&self, file_id: FileId) -> Cancelable<Vec<Runnable>> { | 394 | pub fn runnables(&self, file_id: FileId) -> Cancelable<Vec<Runnable>> { |
399 | let file = self.db.source_file(file_id); | 395 | runnables::runnables(&*self.db, file_id) |
400 | Ok(runnables::runnables(self, &file, file_id)) | ||
401 | } | 396 | } |
402 | /// Computes syntax highlighting for the given file. | 397 | /// Computes syntax highlighting for the given file. |
403 | pub fn highlight(&self, file_id: FileId) -> Cancelable<Vec<HighlightedRange>> { | 398 | pub fn highlight(&self, file_id: FileId) -> Cancelable<Vec<HighlightedRange>> { |