diff options
Diffstat (limited to 'crates/ra_ide_api')
-rw-r--r-- | crates/ra_ide_api/src/hover.rs | 4 | ||||
-rw-r--r-- | crates/ra_ide_api/src/lib.rs | 4 | ||||
-rw-r--r-- | crates/ra_ide_api/src/symbol_index.rs | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/crates/ra_ide_api/src/hover.rs b/crates/ra_ide_api/src/hover.rs index f544ffa6d..b66774cdf 100644 --- a/crates/ra_ide_api/src/hover.rs +++ b/crates/ra_ide_api/src/hover.rs | |||
@@ -1,6 +1,6 @@ | |||
1 | use ra_db::{Cancelable, SyntaxDatabase}; | 1 | use ra_db::{Cancelable, SyntaxDatabase}; |
2 | use ra_syntax::{ | 2 | use ra_syntax::{ |
3 | AstNode, SyntaxNode, TreePtr, | 3 | AstNode, SyntaxNode, TreeArc, |
4 | ast::{self, NameOwner}, | 4 | ast::{self, NameOwner}, |
5 | algo::{find_covering_node, find_node_at_offset, find_leaf_at_offset, visit::{visitor, Visitor}}, | 5 | algo::{find_covering_node, find_node_at_offset, find_leaf_at_offset, visit::{visitor, Visitor}}, |
6 | }; | 6 | }; |
@@ -87,7 +87,7 @@ fn doc_text_for(db: &RootDatabase, nav: NavigationTarget) -> Cancelable<Option<S | |||
87 | } | 87 | } |
88 | 88 | ||
89 | impl NavigationTarget { | 89 | impl NavigationTarget { |
90 | fn node(&self, db: &RootDatabase) -> Option<TreePtr<SyntaxNode>> { | 90 | fn node(&self, db: &RootDatabase) -> Option<TreeArc<SyntaxNode>> { |
91 | let source_file = db.source_file(self.file_id()); | 91 | let source_file = db.source_file(self.file_id()); |
92 | let source_file = source_file.syntax(); | 92 | let source_file = source_file.syntax(); |
93 | let node = source_file | 93 | let node = source_file |
diff --git a/crates/ra_ide_api/src/lib.rs b/crates/ra_ide_api/src/lib.rs index 6155d903a..abb50ff95 100644 --- a/crates/ra_ide_api/src/lib.rs +++ b/crates/ra_ide_api/src/lib.rs | |||
@@ -35,7 +35,7 @@ mod parent_module; | |||
35 | 35 | ||
36 | use std::{fmt, sync::Arc}; | 36 | use std::{fmt, sync::Arc}; |
37 | 37 | ||
38 | use ra_syntax::{SourceFile, TreePtr, TextRange, TextUnit}; | 38 | use ra_syntax::{SourceFile, TreeArc, TextRange, TextUnit}; |
39 | use ra_text_edit::TextEdit; | 39 | use ra_text_edit::TextEdit; |
40 | use ra_db::{SyntaxDatabase, FilesDatabase, BaseDatabase}; | 40 | use ra_db::{SyntaxDatabase, FilesDatabase, BaseDatabase}; |
41 | use rayon::prelude::*; | 41 | use rayon::prelude::*; |
@@ -303,7 +303,7 @@ impl Analysis { | |||
303 | } | 303 | } |
304 | 304 | ||
305 | /// Gets the syntax tree of the file. | 305 | /// Gets the syntax tree of the file. |
306 | pub fn file_syntax(&self, file_id: FileId) -> TreePtr<SourceFile> { | 306 | pub fn file_syntax(&self, file_id: FileId) -> TreeArc<SourceFile> { |
307 | self.db.source_file(file_id).clone() | 307 | self.db.source_file(file_id).clone() |
308 | } | 308 | } |
309 | 309 | ||
diff --git a/crates/ra_ide_api/src/symbol_index.rs b/crates/ra_ide_api/src/symbol_index.rs index 8dd15b40e..fdda57022 100644 --- a/crates/ra_ide_api/src/symbol_index.rs +++ b/crates/ra_ide_api/src/symbol_index.rs | |||
@@ -27,7 +27,7 @@ use std::{ | |||
27 | 27 | ||
28 | use fst::{self, Streamer}; | 28 | use fst::{self, Streamer}; |
29 | use ra_syntax::{ | 29 | use ra_syntax::{ |
30 | SyntaxNode, SourceFile, SmolStr, TreePtr, AstNode, | 30 | SyntaxNode, SourceFile, SmolStr, TreeArc, AstNode, |
31 | algo::{visit::{visitor, Visitor}, find_covering_node}, | 31 | algo::{visit::{visitor, Visitor}, find_covering_node}, |
32 | SyntaxKind::{self, *}, | 32 | SyntaxKind::{self, *}, |
33 | ast::{self, NameOwner}, | 33 | ast::{self, NameOwner}, |
@@ -141,7 +141,7 @@ impl SymbolIndex { | |||
141 | } | 141 | } |
142 | 142 | ||
143 | pub(crate) fn for_files( | 143 | pub(crate) fn for_files( |
144 | files: impl ParallelIterator<Item = (FileId, TreePtr<SourceFile>)>, | 144 | files: impl ParallelIterator<Item = (FileId, TreeArc<SourceFile>)>, |
145 | ) -> SymbolIndex { | 145 | ) -> SymbolIndex { |
146 | let symbols = files | 146 | let symbols = files |
147 | .flat_map(|(file_id, file)| { | 147 | .flat_map(|(file_id, file)| { |