diff options
author | Aleksey Kladov <[email protected]> | 2018-08-17 19:10:55 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-08-17 19:10:55 +0100 |
commit | 70097504f78c4c41368a0b864a94df95fb9c27f7 (patch) | |
tree | c4034cab3c0d0b9488c0be538ae1d4c286570de9 /crates/libanalysis/src | |
parent | ed7ae78c6fd9e508f6e959c6a164cf8481f6b377 (diff) |
hide root
Diffstat (limited to 'crates/libanalysis/src')
-rw-r--r-- | crates/libanalysis/src/lib.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/libanalysis/src/lib.rs b/crates/libanalysis/src/lib.rs index b1093fe83..ae96a0d62 100644 --- a/crates/libanalysis/src/lib.rs +++ b/crates/libanalysis/src/lib.rs | |||
@@ -26,7 +26,7 @@ use std::{ | |||
26 | }; | 26 | }; |
27 | 27 | ||
28 | use libsyntax2::{ | 28 | use libsyntax2::{ |
29 | TextUnit, TextRange, SyntaxRoot, | 29 | TextUnit, TextRange, RefRoot, |
30 | ast::{self, AstNode, NameOwner}, | 30 | ast::{self, AstNode, NameOwner}, |
31 | SyntaxKind::*, | 31 | SyntaxKind::*, |
32 | }; | 32 | }; |
@@ -151,7 +151,7 @@ impl World { | |||
151 | Ok(vec![]) | 151 | Ok(vec![]) |
152 | } | 152 | } |
153 | 153 | ||
154 | fn index_resolve(&self, name_ref: ast::NameRef<&SyntaxRoot>) -> Vec<(FileId, FileSymbol)> { | 154 | fn index_resolve(&self, name_ref: ast::NameRef<RefRoot>) -> Vec<(FileId, FileSymbol)> { |
155 | let name = name_ref.text(); | 155 | let name = name_ref.text(); |
156 | let mut query = Query::new(name.to_string()); | 156 | let mut query = Query::new(name.to_string()); |
157 | query.exact(); | 157 | query.exact(); |
@@ -159,7 +159,7 @@ impl World { | |||
159 | self.world_symbols(query) | 159 | self.world_symbols(query) |
160 | } | 160 | } |
161 | 161 | ||
162 | fn resolve_module(&self, id: FileId, module: ast::Module<&SyntaxRoot>) -> Vec<(FileId, FileSymbol)> { | 162 | fn resolve_module(&self, id: FileId, module: ast::Module<RefRoot>) -> Vec<(FileId, FileSymbol)> { |
163 | let name = match module.name() { | 163 | let name = match module.name() { |
164 | Some(name) => name.text(), | 164 | Some(name) => name.text(), |
165 | None => return Vec::new(), | 165 | None => return Vec::new(), |