mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-13 05:38:46 +00:00
Set enable_proc_attr_macros in hir_ty TestDB
This commit is contained in:
parent
d1c4d28eed
commit
17565f4dea
1 changed files with 9 additions and 1 deletions
|
@ -22,11 +22,19 @@ use test_utils::extract_annotations;
|
|||
hir_def::db::DefDatabaseStorage,
|
||||
crate::db::HirDatabaseStorage
|
||||
)]
|
||||
#[derive(Default)]
|
||||
pub(crate) struct TestDB {
|
||||
storage: salsa::Storage<TestDB>,
|
||||
events: Mutex<Option<Vec<salsa::Event>>>,
|
||||
}
|
||||
|
||||
impl Default for TestDB {
|
||||
fn default() -> Self {
|
||||
let mut this = Self { storage: Default::default(), events: Default::default() };
|
||||
this.set_enable_proc_attr_macros(true);
|
||||
this
|
||||
}
|
||||
}
|
||||
|
||||
impl fmt::Debug for TestDB {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
f.debug_struct("TestDB").finish()
|
||||
|
|
Loading…
Reference in a new issue