From a6224f36200c768d49b6450204fd95edaa559b50 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 18 Jul 2019 22:29:20 +0300 Subject: make Parse generic --- crates/ra_db/src/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'crates/ra_db/src') diff --git a/crates/ra_db/src/lib.rs b/crates/ra_db/src/lib.rs index 11e18a03d..b82d1bda0 100644 --- a/crates/ra_db/src/lib.rs +++ b/crates/ra_db/src/lib.rs @@ -5,7 +5,7 @@ mod input; use std::{panic, sync::Arc}; use ra_prof::profile; -use ra_syntax::{Parse, SourceFile, TextRange, TextUnit}; +use ra_syntax::{ast, Parse, SourceFile, TextRange, TextUnit}; use relative_path::RelativePathBuf; pub use crate::{ @@ -74,7 +74,7 @@ pub trait SourceDatabase: CheckCanceled + std::fmt::Debug { fn file_text(&self, file_id: FileId) -> Arc; // Parses the file into the syntax tree. #[salsa::invoke(parse_query)] - fn parse(&self, file_id: FileId) -> Parse; + fn parse(&self, file_id: FileId) -> Parse; /// Path to a file, relative to the root of its source root. #[salsa::input] fn file_relative_path(&self, file_id: FileId) -> RelativePathBuf; @@ -98,7 +98,7 @@ fn source_root_crates(db: &impl SourceDatabase, id: SourceRootId) -> Arc Parse { +fn parse_query(db: &impl SourceDatabase, file_id: FileId) -> Parse { let _p = profile("parse_query"); let text = db.file_text(file_id); SourceFile::parse(&*text) -- cgit v1.2.3