diff options
Diffstat (limited to 'crates/ra_db/src/lib.rs')
-rw-r--r-- | crates/ra_db/src/lib.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/ra_db/src/lib.rs b/crates/ra_db/src/lib.rs index 7181f2950..3c41ee56d 100644 --- a/crates/ra_db/src/lib.rs +++ b/crates/ra_db/src/lib.rs | |||
@@ -8,7 +8,7 @@ pub mod mock; | |||
8 | use std::sync::Arc; | 8 | use std::sync::Arc; |
9 | 9 | ||
10 | use ra_editor::LineIndex; | 10 | use ra_editor::LineIndex; |
11 | use ra_syntax::{TextUnit, TextRange, SourceFileNode}; | 11 | use ra_syntax::{TextUnit, TextRange, SourceFile, TreePtr}; |
12 | 12 | ||
13 | pub use crate::{ | 13 | pub use crate::{ |
14 | cancelation::{Canceled, Cancelable}, | 14 | cancelation::{Canceled, Cancelable}, |
@@ -47,7 +47,7 @@ pub trait BaseDatabase: salsa::Database { | |||
47 | 47 | ||
48 | salsa::query_group! { | 48 | salsa::query_group! { |
49 | pub trait SyntaxDatabase: crate::input::FilesDatabase + BaseDatabase { | 49 | pub trait SyntaxDatabase: crate::input::FilesDatabase + BaseDatabase { |
50 | fn source_file(file_id: FileId) -> SourceFileNode { | 50 | fn source_file(file_id: FileId) -> TreePtr<SourceFile> { |
51 | type SourceFileQuery; | 51 | type SourceFileQuery; |
52 | } | 52 | } |
53 | fn file_lines(file_id: FileId) -> Arc<LineIndex> { | 53 | fn file_lines(file_id: FileId) -> Arc<LineIndex> { |
@@ -56,9 +56,9 @@ salsa::query_group! { | |||
56 | } | 56 | } |
57 | } | 57 | } |
58 | 58 | ||
59 | fn source_file(db: &impl SyntaxDatabase, file_id: FileId) -> SourceFileNode { | 59 | fn source_file(db: &impl SyntaxDatabase, file_id: FileId) -> TreePtr<SourceFile> { |
60 | let text = db.file_text(file_id); | 60 | let text = db.file_text(file_id); |
61 | SourceFileNode::parse(&*text) | 61 | SourceFile::parse(&*text) |
62 | } | 62 | } |
63 | fn file_lines(db: &impl SyntaxDatabase, file_id: FileId) -> Arc<LineIndex> { | 63 | fn file_lines(db: &impl SyntaxDatabase, file_id: FileId) -> Arc<LineIndex> { |
64 | let text = db.file_text(file_id); | 64 | let text = db.file_text(file_id); |