diff options
Diffstat (limited to 'crates/ra_analysis/src/db.rs')
-rw-r--r-- | crates/ra_analysis/src/db.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/ra_analysis/src/db.rs b/crates/ra_analysis/src/db.rs index 627512553..194f1a6b0 100644 --- a/crates/ra_analysis/src/db.rs +++ b/crates/ra_analysis/src/db.rs | |||
@@ -1,7 +1,7 @@ | |||
1 | use std::sync::Arc; | 1 | use std::sync::Arc; |
2 | 2 | ||
3 | use ra_editor::LineIndex; | 3 | use ra_editor::LineIndex; |
4 | use ra_syntax::{File, SyntaxNode}; | 4 | use ra_syntax::{SourceFileNode, SyntaxNode}; |
5 | use salsa::{self, Database}; | 5 | use salsa::{self, Database}; |
6 | 6 | ||
7 | use crate::{ | 7 | use crate::{ |
@@ -85,7 +85,7 @@ salsa::database_storage! { | |||
85 | 85 | ||
86 | salsa::query_group! { | 86 | salsa::query_group! { |
87 | pub(crate) trait SyntaxDatabase: crate::input::FilesDatabase { | 87 | pub(crate) trait SyntaxDatabase: crate::input::FilesDatabase { |
88 | fn file_syntax(file_id: FileId) -> File { | 88 | fn file_syntax(file_id: FileId) -> SourceFileNode { |
89 | type FileSyntaxQuery; | 89 | type FileSyntaxQuery; |
90 | } | 90 | } |
91 | fn file_lines(file_id: FileId) -> Arc<LineIndex> { | 91 | fn file_lines(file_id: FileId) -> Arc<LineIndex> { |
@@ -103,9 +103,9 @@ salsa::query_group! { | |||
103 | } | 103 | } |
104 | } | 104 | } |
105 | 105 | ||
106 | fn file_syntax(db: &impl SyntaxDatabase, file_id: FileId) -> File { | 106 | fn file_syntax(db: &impl SyntaxDatabase, file_id: FileId) -> SourceFileNode { |
107 | let text = db.file_text(file_id); | 107 | let text = db.file_text(file_id); |
108 | File::parse(&*text) | 108 | SourceFileNode::parse(&*text) |
109 | } | 109 | } |
110 | fn file_lines(db: &impl SyntaxDatabase, file_id: FileId) -> Arc<LineIndex> { | 110 | fn file_lines(db: &impl SyntaxDatabase, file_id: FileId) -> Arc<LineIndex> { |
111 | let text = db.file_text(file_id); | 111 | let text = db.file_text(file_id); |