mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 22:01:37 +00:00
fix syntax errors in tests
This commit is contained in:
parent
2e3f5af9d4
commit
c8bcfe6a05
7 changed files with 137 additions and 121 deletions
|
@ -4,7 +4,7 @@ mod input;
|
|||
|
||||
use std::{panic, sync::Arc};
|
||||
|
||||
use ra_syntax::{TextUnit, TextRange, SourceFile, TreeArc};
|
||||
use ra_syntax::{TextUnit, TextRange, SourceFile, Parse};
|
||||
use relative_path::RelativePathBuf;
|
||||
use ra_prof::profile;
|
||||
|
||||
|
@ -74,7 +74,7 @@ pub trait SourceDatabase: CheckCanceled + std::fmt::Debug {
|
|||
fn file_text(&self, file_id: FileId) -> Arc<String>;
|
||||
// Parses the file into the syntax tree.
|
||||
#[salsa::invoke(parse_query)]
|
||||
fn parse(&self, file_id: FileId) -> TreeArc<SourceFile>;
|
||||
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<Vec<Cra
|
|||
Arc::new(res)
|
||||
}
|
||||
|
||||
fn parse_query(db: &impl SourceDatabase, file_id: FileId) -> TreeArc<SourceFile> {
|
||||
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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue