diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-01-26 08:55:38 +0000 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-01-26 08:55:38 +0000 |
commit | 8b6dea348fa02a7ce8107a1e73917f0597f2a91d (patch) | |
tree | 36b2bc1e21eccda2c624e3dd70ddd7052b9f9907 /crates/ra_db | |
parent | c869ee219a80af1993496e00490dc107202ff55c (diff) | |
parent | 9457b1f0e64d38e7dc24d8c66a52ffef759d4dbf (diff) |
Merge #666
666: rename source_file -> parse r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_db')
-rw-r--r-- | crates/ra_db/src/lib.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_db/src/lib.rs b/crates/ra_db/src/lib.rs index 2664dc69a..6e17f33f0 100644 --- a/crates/ra_db/src/lib.rs +++ b/crates/ra_db/src/lib.rs | |||
@@ -71,7 +71,7 @@ pub trait SourceDatabase: salsa::Database + CheckCanceled { | |||
71 | #[salsa::input] | 71 | #[salsa::input] |
72 | fn file_text(&self, file_id: FileId) -> Arc<String>; | 72 | fn file_text(&self, file_id: FileId) -> Arc<String>; |
73 | // Parses the file into the syntax tree. | 73 | // Parses the file into the syntax tree. |
74 | fn source_file(&self, file_id: FileId) -> TreeArc<SourceFile>; | 74 | fn parse(&self, file_id: FileId) -> TreeArc<SourceFile>; |
75 | /// Path to a file, relative to the root of its source root. | 75 | /// Path to a file, relative to the root of its source root. |
76 | #[salsa::input] | 76 | #[salsa::input] |
77 | fn file_relative_path(&self, file_id: FileId) -> RelativePathBuf; | 77 | 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 | ||
101 | fn source_file(db: &impl SourceDatabase, file_id: FileId) -> TreeArc<SourceFile> { | 101 | fn parse(db: &impl SourceDatabase, file_id: FileId) -> TreeArc<SourceFile> { |
102 | let text = db.file_text(file_id); | 102 | let text = db.file_text(file_id); |
103 | SourceFile::parse(&*text) | 103 | SourceFile::parse(&*text) |
104 | } | 104 | } |