mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
Merge #656
656: :arrow_up deps r=matklad a=matklad Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
This commit is contained in:
commit
3c7acecade
10 changed files with 88 additions and 78 deletions
|
@ -18,7 +18,7 @@ use crate::{
|
|||
generics::{GenericParams, GenericDef},
|
||||
};
|
||||
|
||||
#[salsa::query_group]
|
||||
#[salsa::query_group(HirDatabaseStorage)]
|
||||
pub trait HirDatabase: SyntaxDatabase + AsRef<HirInterner> {
|
||||
#[salsa::invoke(HirFileId::hir_source_file)]
|
||||
fn hir_source_file(&self, file_id: HirFileId) -> TreeArc<SourceFile>;
|
||||
|
|
|
@ -2,7 +2,7 @@ use std::{sync::Arc, panic};
|
|||
|
||||
use parking_lot::Mutex;
|
||||
use ra_db::{
|
||||
BaseDatabase, FilePosition, FileId, CrateGraph, SourceRoot, SourceRootId, FilesDatabase,
|
||||
BaseDatabase, FilePosition, FileId, CrateGraph, SourceRoot, SourceRootId, FilesDatabase, salsa,
|
||||
};
|
||||
use relative_path::RelativePathBuf;
|
||||
use test_utils::{parse_fixture, CURSOR_MARKER, extract_offset};
|
||||
|
@ -11,7 +11,11 @@ use crate::{db, HirInterner};
|
|||
|
||||
pub const WORKSPACE: SourceRootId = SourceRootId(0);
|
||||
|
||||
#[salsa::database(ra_db::FilesDatabase, ra_db::SyntaxDatabase, db::HirDatabase)]
|
||||
#[salsa::database(
|
||||
ra_db::FilesDatabaseStorage,
|
||||
ra_db::SyntaxDatabaseStorage,
|
||||
db::HirDatabaseStorage
|
||||
)]
|
||||
#[derive(Debug)]
|
||||
pub(crate) struct MockDatabase {
|
||||
events: Mutex<Option<Vec<salsa::Event<MockDatabase>>>>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue