Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/test_db.rs')
-rw-r--r--crates/hir-ty/src/test_db.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/crates/hir-ty/src/test_db.rs b/crates/hir-ty/src/test_db.rs
index 7d19e0a191..a3383b2b5d 100644
--- a/crates/hir-ty/src/test_db.rs
+++ b/crates/hir-ty/src/test_db.rs
@@ -7,7 +7,7 @@ use base_db::{
AnchoredPath, CrateId, FileId, FileLoader, FileLoaderDelegate, SourceDatabase, Upcast,
};
use hir_def::{db::DefDatabase, ModuleId};
-use hir_expand::db::ExpandDatabase;
+use hir_expand::{db::ExpandDatabase, hygiene::SyntaxContextData};
use nohash_hasher::IntMap;
use rustc_hash::FxHashSet;
use syntax::TextRange;
@@ -30,6 +30,7 @@ pub(crate) struct TestDB {
impl Default for TestDB {
fn default() -> Self {
let mut this = Self { storage: Default::default(), events: Default::default() };
+ this.intern_syntax_context(SyntaxContextData::root());
this.set_expand_proc_attr_macros_with_durability(true, Durability::HIGH);
this
}