aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_db/src/lib.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-05-28 16:07:39 +0100
committerAleksey Kladov <[email protected]>2019-05-28 16:07:39 +0100
commitc8bcfe6a05d82e151d459bcd2bd8a7b2742f7a66 (patch)
tree407e3ec2b7b4a88634e85c113d5e219cc413535a /crates/ra_db/src/lib.rs
parent2e3f5af9d49db5732405050e6c5442cb6eeef965 (diff)
fix syntax errors in tests
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 68b9a7143..7c49c585b 100644
--- a/crates/ra_db/src/lib.rs
+++ b/crates/ra_db/src/lib.rs
@@ -4,7 +4,7 @@ mod input;
4 4
5use std::{panic, sync::Arc}; 5use std::{panic, sync::Arc};
6 6
7use ra_syntax::{TextUnit, TextRange, SourceFile, TreeArc}; 7use ra_syntax::{TextUnit, TextRange, SourceFile, Parse};
8use relative_path::RelativePathBuf; 8use relative_path::RelativePathBuf;
9use ra_prof::profile; 9use ra_prof::profile;
10 10
@@ -74,7 +74,7 @@ pub trait SourceDatabase: CheckCanceled + std::fmt::Debug {
74 fn file_text(&self, file_id: FileId) -> Arc<String>; 74 fn file_text(&self, file_id: FileId) -> Arc<String>;
75 // Parses the file into the syntax tree. 75 // Parses the file into the syntax tree.
76 #[salsa::invoke(parse_query)] 76 #[salsa::invoke(parse_query)]
77 fn parse(&self, file_id: FileId) -> TreeArc<SourceFile>; 77 fn parse(&self, file_id: FileId) -> Parse;
78 /// Path to a file, relative to the root of its source root. 78 /// Path to a file, relative to the root of its source root.
79 #[salsa::input] 79 #[salsa::input]
80 fn file_relative_path(&self, file_id: FileId) -> RelativePathBuf; 80 fn file_relative_path(&self, file_id: FileId) -> RelativePathBuf;
@@ -98,7 +98,7 @@ fn source_root_crates(db: &impl SourceDatabase, id: SourceRootId) -> Arc<Vec<Cra
98 Arc::new(res) 98 Arc::new(res)
99} 99}
100 100
101fn parse_query(db: &impl SourceDatabase, file_id: FileId) -> TreeArc<SourceFile> { 101fn parse_query(db: &impl SourceDatabase, file_id: FileId) -> Parse {
102 let _p = profile("parse_query"); 102 let _p = profile("parse_query");
103 let text = db.file_text(file_id); 103 let text = db.file_text(file_id);
104 SourceFile::parse(&*text) 104 SourceFile::parse(&*text)