diff options
author | Jonas Schievink <[email protected]> | 2021-06-03 17:11:33 +0100 |
---|---|---|
committer | Jonas Schievink <[email protected]> | 2021-06-03 17:11:33 +0100 |
commit | 17565f4deafab800d8d87208cff1e27d028e9b0e (patch) | |
tree | eb377999a5e8677c210791440b18593f909198e6 /crates/hir_ty/src | |
parent | d1c4d28eedf4ccead50afa21fbaf5966820405f6 (diff) |
Set enable_proc_attr_macros in hir_ty TestDB
Diffstat (limited to 'crates/hir_ty/src')
-rw-r--r-- | crates/hir_ty/src/test_db.rs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/crates/hir_ty/src/test_db.rs b/crates/hir_ty/src/test_db.rs index 381b98ba8..4640ea821 100644 --- a/crates/hir_ty/src/test_db.rs +++ b/crates/hir_ty/src/test_db.rs | |||
@@ -22,11 +22,19 @@ use test_utils::extract_annotations; | |||
22 | hir_def::db::DefDatabaseStorage, | 22 | hir_def::db::DefDatabaseStorage, |
23 | crate::db::HirDatabaseStorage | 23 | crate::db::HirDatabaseStorage |
24 | )] | 24 | )] |
25 | #[derive(Default)] | ||
26 | pub(crate) struct TestDB { | 25 | pub(crate) struct TestDB { |
27 | storage: salsa::Storage<TestDB>, | 26 | storage: salsa::Storage<TestDB>, |
28 | events: Mutex<Option<Vec<salsa::Event>>>, | 27 | events: Mutex<Option<Vec<salsa::Event>>>, |
29 | } | 28 | } |
29 | |||
30 | impl Default for TestDB { | ||
31 | fn default() -> Self { | ||
32 | let mut this = Self { storage: Default::default(), events: Default::default() }; | ||
33 | this.set_enable_proc_attr_macros(true); | ||
34 | this | ||
35 | } | ||
36 | } | ||
37 | |||
30 | impl fmt::Debug for TestDB { | 38 | impl fmt::Debug for TestDB { |
31 | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { | 39 | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { |
32 | f.debug_struct("TestDB").finish() | 40 | f.debug_struct("TestDB").finish() |