diff options
Diffstat (limited to 'crates/ra_analysis/src/lib.rs')
-rw-r--r-- | crates/ra_analysis/src/lib.rs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/crates/ra_analysis/src/lib.rs b/crates/ra_analysis/src/lib.rs index b26e9e9ff..3fa4189ce 100644 --- a/crates/ra_analysis/src/lib.rs +++ b/crates/ra_analysis/src/lib.rs | |||
@@ -38,7 +38,7 @@ pub use ra_editor::{ | |||
38 | pub use hir::FnSignatureInfo; | 38 | pub use hir::FnSignatureInfo; |
39 | 39 | ||
40 | pub use ra_db::{ | 40 | pub use ra_db::{ |
41 | Canceled, Cancelable, FilePosition, | 41 | Canceled, Cancelable, FilePosition, FileRange, |
42 | CrateGraph, CrateId, SourceRootId, FileId | 42 | CrateGraph, CrateId, SourceRootId, FileId |
43 | }; | 43 | }; |
44 | 44 | ||
@@ -287,9 +287,9 @@ impl Analysis { | |||
287 | let file = self.imp.file_syntax(file_id); | 287 | let file = self.imp.file_syntax(file_id); |
288 | ra_editor::syntax_tree(&file) | 288 | ra_editor::syntax_tree(&file) |
289 | } | 289 | } |
290 | pub fn join_lines(&self, file_id: FileId, range: TextRange) -> SourceChange { | 290 | pub fn join_lines(&self, frange: FileRange) -> SourceChange { |
291 | let file = self.imp.file_syntax(file_id); | 291 | let file = self.imp.file_syntax(frange.file_id); |
292 | SourceChange::from_local_edit(file_id, ra_editor::join_lines(&file, range)) | 292 | SourceChange::from_local_edit(frange.file_id, ra_editor::join_lines(&file, frange.range)) |
293 | } | 293 | } |
294 | pub fn on_enter(&self, position: FilePosition) -> Option<SourceChange> { | 294 | pub fn on_enter(&self, position: FilePosition) -> Option<SourceChange> { |
295 | let file = self.imp.file_syntax(position.file_id); | 295 | let file = self.imp.file_syntax(position.file_id); |
@@ -346,8 +346,8 @@ impl Analysis { | |||
346 | pub fn completions(&self, position: FilePosition) -> Cancelable<Option<Vec<CompletionItem>>> { | 346 | pub fn completions(&self, position: FilePosition) -> Cancelable<Option<Vec<CompletionItem>>> { |
347 | self.imp.completions(position) | 347 | self.imp.completions(position) |
348 | } | 348 | } |
349 | pub fn assists(&self, file_id: FileId, range: TextRange) -> Cancelable<Vec<SourceChange>> { | 349 | pub fn assists(&self, frange: FileRange) -> Cancelable<Vec<SourceChange>> { |
350 | Ok(self.imp.assists(file_id, range)) | 350 | Ok(self.imp.assists(frange)) |
351 | } | 351 | } |
352 | pub fn diagnostics(&self, file_id: FileId) -> Cancelable<Vec<Diagnostic>> { | 352 | pub fn diagnostics(&self, file_id: FileId) -> Cancelable<Vec<Diagnostic>> { |
353 | self.imp.diagnostics(file_id) | 353 | self.imp.diagnostics(file_id) |
@@ -358,8 +358,8 @@ impl Analysis { | |||
358 | ) -> Cancelable<Option<(FnSignatureInfo, Option<usize>)>> { | 358 | ) -> Cancelable<Option<(FnSignatureInfo, Option<usize>)>> { |
359 | self.imp.resolve_callable(position) | 359 | self.imp.resolve_callable(position) |
360 | } | 360 | } |
361 | pub fn type_of(&self, file_id: FileId, range: TextRange) -> Cancelable<Option<String>> { | 361 | pub fn type_of(&self, frange: FileRange) -> Cancelable<Option<String>> { |
362 | self.imp.type_of(file_id, range) | 362 | self.imp.type_of(frange) |
363 | } | 363 | } |
364 | } | 364 | } |
365 | 365 | ||