mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 22:54:58 +00:00
Simplify FileDelegate
This commit is contained in:
parent
000eed1da8
commit
fcb88832de
36 changed files with 78 additions and 86 deletions
|
@ -15,7 +15,7 @@ use test_utils::extract_annotations;
|
|||
use triomphe::Arc;
|
||||
|
||||
#[salsa::database(
|
||||
base_db::SourceDatabaseExtStorage,
|
||||
base_db::SourceRootDatabaseStorage,
|
||||
base_db::SourceDatabaseStorage,
|
||||
hir_expand::db::ExpandDatabaseStorage,
|
||||
hir_def::db::InternDatabaseStorage,
|
||||
|
@ -75,9 +75,6 @@ impl salsa::ParallelDatabase for TestDB {
|
|||
impl panic::RefUnwindSafe for TestDB {}
|
||||
|
||||
impl FileLoader for TestDB {
|
||||
fn file_text(&self, file_id: FileId) -> Arc<str> {
|
||||
FileLoaderDelegate(self).file_text(file_id)
|
||||
}
|
||||
fn resolve_path(&self, path: AnchoredPath<'_>) -> Option<FileId> {
|
||||
FileLoaderDelegate(self).resolve_path(path)
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ mod traits;
|
|||
|
||||
use std::env;
|
||||
|
||||
use base_db::SourceDatabaseExt2 as _;
|
||||
use base_db::SourceDatabaseFileInputExt as _;
|
||||
use expect_test::Expect;
|
||||
use hir_def::{
|
||||
body::{Body, BodySourceMap, SyntheticSyntax},
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
use base_db::SourceDatabaseExt2 as _;
|
||||
use base_db::SourceDatabaseFileInputExt as _;
|
||||
use test_fixture::WithFixture;
|
||||
|
||||
use crate::{db::HirDatabase, test_db::TestDB};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue