diff options
Diffstat (limited to 'crates/ra_analysis/src/symbol_index.rs')
-rw-r--r-- | crates/ra_analysis/src/symbol_index.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/crates/ra_analysis/src/symbol_index.rs b/crates/ra_analysis/src/symbol_index.rs index e2b1c88fe..8dd15b40e 100644 --- a/crates/ra_analysis/src/symbol_index.rs +++ b/crates/ra_analysis/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 | SyntaxNodeRef, SourceFileNode, SmolStr, | 30 | SyntaxNode, SourceFile, SmolStr, TreePtr, 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, SourceFileNode)>, | 144 | files: impl ParallelIterator<Item = (FileId, TreePtr<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)| { |
@@ -203,9 +203,9 @@ pub(crate) struct FileSymbol { | |||
203 | pub(crate) ptr: LocalSyntaxPtr, | 203 | pub(crate) ptr: LocalSyntaxPtr, |
204 | } | 204 | } |
205 | 205 | ||
206 | fn to_symbol(node: SyntaxNodeRef) -> Option<(SmolStr, LocalSyntaxPtr)> { | 206 | fn to_symbol(node: &SyntaxNode) -> Option<(SmolStr, LocalSyntaxPtr)> { |
207 | fn decl<'a, N: NameOwner<'a>>(node: N) -> Option<(SmolStr, LocalSyntaxPtr)> { | 207 | fn decl<N: NameOwner>(node: &N) -> Option<(SmolStr, LocalSyntaxPtr)> { |
208 | let name = node.name()?.text(); | 208 | let name = node.name()?.text().clone(); |
209 | let ptr = LocalSyntaxPtr::new(node.syntax()); | 209 | let ptr = LocalSyntaxPtr::new(node.syntax()); |
210 | Some((name, ptr)) | 210 | Some((name, ptr)) |
211 | } | 211 | } |