aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_db/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_db/src/lib.rs')
-rw-r--r--crates/ra_db/src/lib.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_db/src/lib.rs b/crates/ra_db/src/lib.rs
index 20e712afe..0c4dfc8c6 100644
--- a/crates/ra_db/src/lib.rs
+++ b/crates/ra_db/src/lib.rs
@@ -7,7 +7,7 @@ pub mod mock;
7 7
8use std::panic; 8use std::panic;
9 9
10use ra_syntax::{TextUnit, TextRange, SourceFile, TreePtr}; 10use ra_syntax::{TextUnit, TextRange, SourceFile, TreeArc};
11 11
12pub use crate::{ 12pub use crate::{
13 cancellation::{Canceled, Cancelable}, 13 cancellation::{Canceled, Cancelable},
@@ -40,13 +40,13 @@ pub trait BaseDatabase: salsa::Database + panic::RefUnwindSafe {
40 40
41salsa::query_group! { 41salsa::query_group! {
42 pub trait SyntaxDatabase: crate::input::FilesDatabase + BaseDatabase { 42 pub trait SyntaxDatabase: crate::input::FilesDatabase + BaseDatabase {
43 fn source_file(file_id: FileId) -> TreePtr<SourceFile> { 43 fn source_file(file_id: FileId) -> TreeArc<SourceFile> {
44 type SourceFileQuery; 44 type SourceFileQuery;
45 } 45 }
46 } 46 }
47} 47}
48 48
49fn source_file(db: &impl SyntaxDatabase, file_id: FileId) -> TreePtr<SourceFile> { 49fn source_file(db: &impl SyntaxDatabase, file_id: FileId) -> TreeArc<SourceFile> {
50 let text = db.file_text(file_id); 50 let text = db.file_text(file_id);
51 SourceFile::parse(&*text) 51 SourceFile::parse(&*text)
52} 52}