Unnamed repository; edit this file 'description' to name the repository.
move `ExpandDatabase::{proc_macros,proc_macros_for_crate}` out of the query group
This required several non-trivial changes: - `ExpandDatabase::proc_macros` is now `ProcMacros::get`, which we recommend against using. - `ExpandDatabase::proc_macros_for_crate` is now `ProcMacros::get_for_crate` - Change `ProcMacroBuilder::build` to take `db` and `durability`, as it will need to build `ProcMacros` inside the db. Also rename it to `build_in`, to reflect the change in functionality. - `ProcMacros` is now stored in the database directly, instead of being wrapped in an `Arc`. This should be fine though, since its `by_crate` field is marked with `#[returns(ref)]`.
Ada Alakbarova 3 weeks ago
parent 57632be · commit 1c01561
-rw-r--r--crates/hir-def/src/expr_store/tests/body/block.rs4
-rw-r--r--crates/hir-def/src/macro_expansion_tests/mbe.rs16
-rw-r--r--crates/hir-def/src/nameres/collector.rs4
-rw-r--r--crates/hir-def/src/nameres/tests/incremental.rs6
-rw-r--r--crates/hir-expand/src/change.rs6
-rw-r--r--crates/hir-expand/src/db.rs10
-rw-r--r--crates/hir-expand/src/lib.rs4
-rw-r--r--crates/hir-expand/src/proc_macro.rs46
-rw-r--r--crates/ide-db/src/lib.rs7
-rw-r--r--crates/ide-db/src/test_data/test_doc_alias.txt30
-rw-r--r--crates/ide-db/src/test_data/test_symbol_index_collection.txt138
-rw-r--r--crates/ide-db/src/test_data/test_symbols_exclude_imports.txt4
-rw-r--r--crates/ide-db/src/test_data/test_symbols_with_imports.txt8
13 files changed, 146 insertions, 137 deletions
diff --git a/crates/hir-def/src/expr_store/tests/body/block.rs b/crates/hir-def/src/expr_store/tests/body/block.rs
index 8b12c139f6..f02e0f349b 100644
--- a/crates/hir-def/src/expr_store/tests/body/block.rs
+++ b/crates/hir-def/src/expr_store/tests/body/block.rs
@@ -190,13 +190,13 @@ fn f() {
"#,
expect![[r#"
ModuleIdLt {
- [salsa id]: Id(3003),
+ [salsa id]: Id(2c03),
krate: Crate(
Id(1c00),
),
block: Some(
BlockId(
- 4001,
+ 3c01,
),
),
containing_module_inside_def_map: None,
diff --git a/crates/hir-def/src/macro_expansion_tests/mbe.rs b/crates/hir-def/src/macro_expansion_tests/mbe.rs
index 62bdebe420..9a46ddbdc7 100644
--- a/crates/hir-def/src/macro_expansion_tests/mbe.rs
+++ b/crates/hir-def/src/macro_expansion_tests/mbe.rs
@@ -35,9 +35,9 @@ macro_rules! f {
};
}
-struct#0:MacroRules[BE8F, 0]@58..64#16384# MyTraitMap2#0:MacroCall[BE8F, 0]@31..42#ROOT2024# {#0:MacroRules[BE8F, 0]@72..73#16384#
- map#0:MacroRules[BE8F, 0]@86..89#16384#:#0:MacroRules[BE8F, 0]@89..90#16384# #0:MacroRules[BE8F, 0]@89..90#16384#::#0:MacroRules[BE8F, 0]@91..93#16384#std#0:MacroRules[BE8F, 0]@93..96#16384#::#0:MacroRules[BE8F, 0]@96..98#16384#collections#0:MacroRules[BE8F, 0]@98..109#16384#::#0:MacroRules[BE8F, 0]@109..111#16384#HashSet#0:MacroRules[BE8F, 0]@111..118#16384#<#0:MacroRules[BE8F, 0]@118..119#16384#(#0:MacroRules[BE8F, 0]@119..120#16384#)#0:MacroRules[BE8F, 0]@120..121#16384#>#0:MacroRules[BE8F, 0]@121..122#16384#,#0:MacroRules[BE8F, 0]@122..123#16384#
-}#0:MacroRules[BE8F, 0]@132..133#16384#
+struct#0:MacroRules[BE8F, 0]@58..64#15360# MyTraitMap2#0:MacroCall[BE8F, 0]@31..42#ROOT2024# {#0:MacroRules[BE8F, 0]@72..73#15360#
+ map#0:MacroRules[BE8F, 0]@86..89#15360#:#0:MacroRules[BE8F, 0]@89..90#15360# #0:MacroRules[BE8F, 0]@89..90#15360#::#0:MacroRules[BE8F, 0]@91..93#15360#std#0:MacroRules[BE8F, 0]@93..96#15360#::#0:MacroRules[BE8F, 0]@96..98#15360#collections#0:MacroRules[BE8F, 0]@98..109#15360#::#0:MacroRules[BE8F, 0]@109..111#15360#HashSet#0:MacroRules[BE8F, 0]@111..118#15360#<#0:MacroRules[BE8F, 0]@118..119#15360#(#0:MacroRules[BE8F, 0]@119..120#15360#)#0:MacroRules[BE8F, 0]@120..121#15360#>#0:MacroRules[BE8F, 0]@121..122#15360#,#0:MacroRules[BE8F, 0]@122..123#15360#
+}#0:MacroRules[BE8F, 0]@132..133#15360#
"#]],
);
}
@@ -197,7 +197,7 @@ macro_rules! mk_struct {
#[macro_use]
mod foo;
-struct#1:MacroRules[DB0C, 0]@59..65#16384# Foo#0:MacroCall[DB0C, 0]@32..35#ROOT2024#(#1:MacroRules[DB0C, 0]@70..71#16384#u32#0:MacroCall[DB0C, 0]@41..44#ROOT2024#)#1:MacroRules[DB0C, 0]@74..75#16384#;#1:MacroRules[DB0C, 0]@75..76#16384#
+struct#1:MacroRules[DB0C, 0]@59..65#15360# Foo#0:MacroCall[DB0C, 0]@32..35#ROOT2024#(#1:MacroRules[DB0C, 0]@70..71#15360#u32#0:MacroCall[DB0C, 0]@41..44#ROOT2024#)#1:MacroRules[DB0C, 0]@74..75#15360#;#1:MacroRules[DB0C, 0]@75..76#15360#
"#]],
);
}
@@ -423,10 +423,10 @@ m! { foo, bar }
macro_rules! m {
($($i:ident),*) => ( impl Bar { $(fn $i() {})* } );
}
-impl#\16384# Bar#\16384# {#\16384#
- fn#\16384# foo#\ROOT2024#(#\16384#)#\16384# {#\16384#}#\16384#
- fn#\16384# bar#\ROOT2024#(#\16384#)#\16384# {#\16384#}#\16384#
-}#\16384#
+impl#\15360# Bar#\15360# {#\15360#
+ fn#\15360# foo#\ROOT2024#(#\15360#)#\15360# {#\15360#}#\15360#
+ fn#\15360# bar#\ROOT2024#(#\15360#)#\15360# {#\15360#}#\15360#
+}#\15360#
"#]],
);
}
diff --git a/crates/hir-def/src/nameres/collector.rs b/crates/hir-def/src/nameres/collector.rs
index d52de5282b..219dbe519f 100644
--- a/crates/hir-def/src/nameres/collector.rs
+++ b/crates/hir-def/src/nameres/collector.rs
@@ -15,7 +15,7 @@ use hir_expand::{
builtin::{BuiltinDeriveExpander, find_builtin_attr, find_builtin_derive, find_builtin_macro},
mod_path::{ModPath, PathKind},
name::{AsName, Name},
- proc_macro::CustomProcMacroExpander,
+ proc_macro::{CustomProcMacroExpander, ProcMacros},
};
use intern::{Interned, Symbol, sym};
use itertools::izip;
@@ -79,7 +79,7 @@ pub(super) fn collect_defs(
}
let proc_macros = if krate.is_proc_macro {
- db.proc_macros_for_crate(def_map.krate)
+ ProcMacros::get_for_crate(db, def_map.krate)
.and_then(|proc_macros| {
proc_macros.list(db.syntax_context(tree_id.file_id(), krate.edition))
})
diff --git a/crates/hir-def/src/nameres/tests/incremental.rs b/crates/hir-def/src/nameres/tests/incremental.rs
index 08f672aa0c..72b5cff697 100644
--- a/crates/hir-def/src/nameres/tests/incremental.rs
+++ b/crates/hir-def/src/nameres/tests/incremental.rs
@@ -286,7 +286,7 @@ fn f() { foo }
"parse",
"real_span_map",
"crate_local_def_map",
- "proc_macros_for_crate_shim",
+ "ProcMacros::get_for_crate_",
"file_item_tree_query",
"ast_id_map",
"parse",
@@ -305,6 +305,7 @@ fn f() { foo }
"parse_macro_expansion",
"expand_proc_macro",
"macro_arg",
+ "create_data_ExpandDatabase",
"proc_macro_span_shim",
]
"#]],
@@ -410,7 +411,7 @@ pub struct S {}
"parse",
"real_span_map",
"crate_local_def_map",
- "proc_macros_for_crate_shim",
+ "ProcMacros::get_for_crate_",
"file_item_tree_query",
"ast_id_map",
"parse",
@@ -441,6 +442,7 @@ pub struct S {}
"parse_macro_expansion",
"expand_proc_macro",
"macro_arg",
+ "create_data_ExpandDatabase",
"proc_macro_span_shim",
]
"#]],
diff --git a/crates/hir-expand/src/change.rs b/crates/hir-expand/src/change.rs
index 3959741e6f..22dc2cbd71 100644
--- a/crates/hir-expand/src/change.rs
+++ b/crates/hir-expand/src/change.rs
@@ -2,7 +2,6 @@
//! state. Changes are transactional.
use base_db::{CrateGraphBuilder, FileChange, SourceRoot, salsa::Durability};
use span::FileId;
-use triomphe::Arc;
use crate::{db::ExpandDatabase, proc_macro::ProcMacrosBuilder};
@@ -16,12 +15,13 @@ impl ChangeWithProcMacros {
pub fn apply(self, db: &mut impl ExpandDatabase) {
let crates_id_map = self.source_change.apply(db);
if let Some(proc_macros) = self.proc_macros {
- let proc_macros = proc_macros.build(
+ proc_macros.build_in(
+ db,
+ Durability::HIGH,
crates_id_map
.as_ref()
.expect("cannot set proc macros without setting the crate graph too"),
);
- db.set_proc_macros_with_durability(Arc::new(proc_macros), Durability::HIGH);
}
}
diff --git a/crates/hir-expand/src/db.rs b/crates/hir-expand/src/db.rs
index 33672d10fa..74e27be5a9 100644
--- a/crates/hir-expand/src/db.rs
+++ b/crates/hir-expand/src/db.rs
@@ -17,7 +17,7 @@ use crate::{
declarative::DeclarativeMacroExpander,
fixup::{self, SyntaxFixupUndoInfo},
hygiene::{span_with_call_site_ctxt, span_with_def_site_ctxt, span_with_mixed_site_ctxt},
- proc_macro::{CrateProcMacros, CustomProcMacroExpander, ProcMacros},
+ proc_macro::CustomProcMacroExpander,
span_map::{ExpansionSpanMap, RealSpanMap, SpanMap},
tt,
};
@@ -50,14 +50,6 @@ pub enum TokenExpander<'db> {
#[query_group::query_group]
pub trait ExpandDatabase: SourceDatabase {
- /// The proc macros. Do not use this! Use `proc_macros_for_crate()` instead.
- #[salsa::input]
- fn proc_macros(&self) -> Arc<ProcMacros>;
-
- /// Incrementality query to prevent queries from directly depending on `ExpandDatabase::proc_macros`.
- #[salsa::invoke(crate::proc_macro::proc_macros_for_crate)]
- fn proc_macros_for_crate(&self, krate: Crate) -> Option<Arc<CrateProcMacros>>;
-
#[salsa::invoke(ast_id_map)]
#[salsa::transparent]
fn ast_id_map(&self, file_id: HirFileId) -> &AstIdMap;
diff --git a/crates/hir-expand/src/lib.rs b/crates/hir-expand/src/lib.rs
index 9c5714be2d..3f94f03647 100644
--- a/crates/hir-expand/src/lib.rs
+++ b/crates/hir-expand/src/lib.rs
@@ -53,7 +53,7 @@ use crate::{
},
db::ExpandDatabase,
mod_path::ModPath,
- proc_macro::{CustomProcMacroExpander, ProcMacroKind},
+ proc_macro::{CustomProcMacroExpander, ProcMacroKind, ProcMacros},
span_map::{ExpansionSpanMap, SpanMap},
};
@@ -176,7 +176,7 @@ impl ExpandErrorKind {
kind: RenderedExpandError::DISABLED,
},
&ExpandErrorKind::MissingProcMacroExpander(def_crate) => {
- match db.proc_macros_for_crate(def_crate).as_ref().and_then(|it| it.get_error()) {
+ match ProcMacros::get_for_crate(db, def_crate).and_then(|it| it.get_error()) {
Some(e) => RenderedExpandError {
message: e.to_string(),
error: e.is_hard_error(),
diff --git a/crates/hir-expand/src/proc_macro.rs b/crates/hir-expand/src/proc_macro.rs
index 467eae3122..93bc5daa5b 100644
--- a/crates/hir-expand/src/proc_macro.rs
+++ b/crates/hir-expand/src/proc_macro.rs
@@ -7,6 +7,7 @@ use std::{panic::RefUnwindSafe, sync};
use base_db::{Crate, CrateBuilderId, CratesIdMap, Env, ProcMacroLoadingError};
use intern::Symbol;
use rustc_hash::FxHashMap;
+use salsa::{Durability, Setter};
use span::Span;
use triomphe::Arc;
@@ -83,14 +84,24 @@ impl ProcMacrosBuilder {
);
}
- pub(crate) fn build(self, crates_id_map: &CratesIdMap) -> ProcMacros {
+ /// Builds [`ProcMacros`] and adds id to `db` with the provided `durability`.
+ pub(crate) fn build_in(
+ self,
+ db: &mut dyn ExpandDatabase,
+ durability: Durability,
+ crates_id_map: &CratesIdMap,
+ ) {
let mut map = self
.0
.into_iter()
.map(|(krate, proc_macro)| (crates_id_map[&krate], proc_macro))
.collect::<FxHashMap<_, _>>();
map.shrink_to_fit();
- ProcMacros(map)
+ ProcMacros::try_get(db)
+ .unwrap_or_else(|| ProcMacros::new(db, Default::default()))
+ .set_by_crate(db)
+ .with_durability(durability)
+ .to(map);
}
}
@@ -107,11 +118,25 @@ impl FromIterator<(CrateBuilderId, ProcMacroLoadResult)> for ProcMacrosBuilder {
#[derive(Debug, PartialEq, Eq)]
pub struct CrateProcMacros(StoredProcMacroLoadResult);
-#[derive(Default, Debug)]
-pub struct ProcMacros(FxHashMap<Crate, Arc<CrateProcMacros>>);
+/// The proc macros. Do not use [`Self::get`]! Use [`Self::get_for_crate`] instead.
+#[salsa::input(singleton, debug)]
+pub struct ProcMacros {
+ #[returns(ref)]
+ pub by_crate: FxHashMap<Crate, Arc<CrateProcMacros>>,
+}
+
impl ProcMacros {
- fn get(&self, krate: Crate) -> Option<Arc<CrateProcMacros>> {
- self.0.get(&krate).cloned()
+ pub fn init_default(db: &dyn ExpandDatabase, durability: Durability) {
+ _ = Self::builder(Default::default()).durability(durability).new(db);
+ }
+}
+
+#[salsa::tracked]
+impl ProcMacros {
+ /// Incrementality query to prevent queries from directly depending on [`Self::get`].
+ #[salsa::tracked(returns(as_ref))]
+ pub fn get_for_crate(db: &dyn ExpandDatabase, krate: Crate) -> Option<Arc<CrateProcMacros>> {
+ Self::get(db).by_crate(db).get(&krate).cloned()
}
}
@@ -276,7 +301,7 @@ impl CustomProcMacroExpander {
ExpandError::new(call_site, ExpandErrorKind::MacroDisabled),
),
id => {
- let proc_macros = match db.proc_macros_for_crate(def_crate) {
+ let proc_macros = match ProcMacros::get_for_crate(db, def_crate) {
Some(it) => it,
None => {
return ExpandResult::new(
@@ -347,10 +372,3 @@ impl CustomProcMacroExpander {
}
}
}
-
-pub(crate) fn proc_macros_for_crate(
- db: &dyn ExpandDatabase,
- krate: Crate,
-) -> Option<Arc<CrateProcMacros>> {
- db.proc_macros().get(krate)
-}
diff --git a/crates/ide-db/src/lib.rs b/crates/ide-db/src/lib.rs
index f7e0547e56..c6b4d28169 100644
--- a/crates/ide-db/src/lib.rs
+++ b/crates/ide-db/src/lib.rs
@@ -63,10 +63,7 @@ use base_db::{
CrateGraphBuilder, CratesMap, FileSourceRootInput, FileText, Files, Nonce, SourceDatabase,
SourceRoot, SourceRootId, SourceRootInput, set_all_crates_with_durability,
};
-use hir::{
- FilePositionWrapper, FileRangeWrapper,
- db::{ExpandDatabase, HirDatabase},
-};
+use hir::{FilePositionWrapper, FileRangeWrapper, db::HirDatabase};
use triomphe::Arc;
use crate::line_index::LineIndex;
@@ -203,7 +200,7 @@ impl RootDatabase {
// This needs to be here otherwise `CrateGraphBuilder` will panic.
set_all_crates_with_durability(&mut db, std::iter::empty(), Durability::HIGH);
CrateGraphBuilder::default().set_in_db(&mut db);
- db.set_proc_macros_with_durability(Default::default(), Durability::MEDIUM);
+ hir::ProcMacros::init_default(&db, Durability::MEDIUM);
_ = base_db::LibraryRoots::builder(Default::default())
.durability(Durability::MEDIUM)
.new(&db);
diff --git a/crates/ide-db/src/test_data/test_doc_alias.txt b/crates/ide-db/src/test_data/test_doc_alias.txt
index a959e41dbf..12eb7e8e0a 100644
--- a/crates/ide-db/src/test_data/test_doc_alias.txt
+++ b/crates/ide-db/src/test_data/test_doc_alias.txt
@@ -2,7 +2,7 @@
(
Module {
id: ModuleIdLt {
- [salsa id]: Id(2c00),
+ [salsa id]: Id(2800),
},
},
[
@@ -12,7 +12,7 @@
Struct(
Struct {
id: StructId(
- 3401,
+ 3001,
),
},
),
@@ -20,7 +20,7 @@
loc: DeclarationLocation {
hir_file_id: FileId(
EditionedFileId(
- Id(2800),
+ Id(2400),
),
),
ptr: SyntaxNodePtr {
@@ -49,7 +49,7 @@
Struct(
Struct {
id: StructId(
- 3400,
+ 3000,
),
},
),
@@ -57,7 +57,7 @@
loc: DeclarationLocation {
hir_file_id: FileId(
EditionedFileId(
- Id(2800),
+ Id(2400),
),
),
ptr: SyntaxNodePtr {
@@ -86,7 +86,7 @@
Struct(
Struct {
id: StructId(
- 3400,
+ 3000,
),
},
),
@@ -94,7 +94,7 @@
loc: DeclarationLocation {
hir_file_id: FileId(
EditionedFileId(
- Id(2800),
+ Id(2400),
),
),
ptr: SyntaxNodePtr {
@@ -123,7 +123,7 @@
Struct(
Struct {
id: StructId(
- 3400,
+ 3000,
),
},
),
@@ -131,7 +131,7 @@
loc: DeclarationLocation {
hir_file_id: FileId(
EditionedFileId(
- Id(2800),
+ Id(2400),
),
),
ptr: SyntaxNodePtr {
@@ -160,7 +160,7 @@
Struct(
Struct {
id: StructId(
- 3400,
+ 3000,
),
},
),
@@ -168,7 +168,7 @@
loc: DeclarationLocation {
hir_file_id: FileId(
EditionedFileId(
- Id(2800),
+ Id(2400),
),
),
ptr: SyntaxNodePtr {
@@ -197,7 +197,7 @@
Struct(
Struct {
id: StructId(
- 3401,
+ 3001,
),
},
),
@@ -205,7 +205,7 @@
loc: DeclarationLocation {
hir_file_id: FileId(
EditionedFileId(
- Id(2800),
+ Id(2400),
),
),
ptr: SyntaxNodePtr {
@@ -234,7 +234,7 @@
Struct(
Struct {
id: StructId(
- 3400,
+ 3000,
),
},
),
@@ -242,7 +242,7 @@
loc: DeclarationLocation {
hir_file_id: FileId(
EditionedFileId(
- Id(2800),
+ Id(2400),
),
),
ptr: SyntaxNodePtr {
diff --git a/crates/ide-db/src/test_data/test_symbol_index_collection.txt b/crates/ide-db/src/test_data/test_symbol_index_collection.txt
index 1b17c18f36..0ef19eb493 100644
--- a/crates/ide-db/src/test_data/test_symbol_index_collection.txt
+++ b/crates/ide-db/src/test_data/test_symbol_index_collection.txt
@@ -2,7 +2,7 @@
(
Module {
id: ModuleIdLt {
- [salsa id]: Id(2c00),
+ [salsa id]: Id(2800),
},
},
[
@@ -11,14 +11,14 @@
def: EnumVariant(
EnumVariant {
id: EnumVariantId(
- 7400,
+ 7000,
),
},
),
loc: DeclarationLocation {
hir_file_id: FileId(
EditionedFileId(
- Id(2800),
+ Id(2400),
),
),
ptr: SyntaxNodePtr {
@@ -48,14 +48,14 @@
def: TypeAlias(
TypeAlias {
id: TypeAliasId(
- 6800,
+ 6400,
),
},
),
loc: DeclarationLocation {
hir_file_id: FileId(
EditionedFileId(
- Id(2800),
+ Id(2400),
),
),
ptr: SyntaxNodePtr {
@@ -83,14 +83,14 @@
def: EnumVariant(
EnumVariant {
id: EnumVariantId(
- 7401,
+ 7001,
),
},
),
loc: DeclarationLocation {
hir_file_id: FileId(
EditionedFileId(
- Id(2800),
+ Id(2400),
),
),
ptr: SyntaxNodePtr {
@@ -120,14 +120,14 @@
def: Const(
Const {
id: ConstId(
- 6000,
+ 5c00,
),
},
),
loc: DeclarationLocation {
hir_file_id: FileId(
EditionedFileId(
- Id(2800),
+ Id(2400),
),
),
ptr: SyntaxNodePtr {
@@ -155,14 +155,14 @@
def: Const(
Const {
id: ConstId(
- 6002,
+ 5c02,
),
},
),
loc: DeclarationLocation {
hir_file_id: FileId(
EditionedFileId(
- Id(2800),
+ Id(2400),
),
),
ptr: SyntaxNodePtr {
@@ -191,7 +191,7 @@
Enum(
Enum {
id: EnumId(
- 4c00,
+ 4800,
),
},
),
@@ -199,7 +199,7 @@
loc: DeclarationLocation {
hir_file_id: FileId(
EditionedFileId(
- Id(2800),
+ Id(2400),
),
),
ptr: SyntaxNodePtr {
@@ -228,7 +228,7 @@
Macro {
id: Macro2Id(
Macro2Id(
- 4800,
+ 4400,
),
),
},
@@ -236,7 +236,7 @@
loc: DeclarationLocation {
hir_file_id: FileId(
EditionedFileId(
- Id(2800),
+ Id(2400),
),
),
ptr: SyntaxNodePtr {
@@ -265,7 +265,7 @@
Macro {
id: Macro2Id(
Macro2Id(
- 4800,
+ 4400,
),
),
},
@@ -273,7 +273,7 @@
loc: DeclarationLocation {
hir_file_id: FileId(
EditionedFileId(
- Id(2800),
+ Id(2400),
),
),
ptr: SyntaxNodePtr {
@@ -301,14 +301,14 @@
def: Static(
Static {
id: StaticId(
- 6400,
+ 6000,
),
},
),
loc: DeclarationLocation {
hir_file_id: FileId(
EditionedFileId(
- Id(2800),
+ Id(2400),
),
),
ptr: SyntaxNodePtr {
@@ -337,7 +337,7 @@
Struct(
Struct {
id: StructId(
- 4401,
+ 4001,
),
},
),
@@ -345,7 +345,7 @@
loc: DeclarationLocation {
hir_file_id: FileId(
EditionedFileId(
- Id(2800),
+ Id(2400),
),
),
ptr: SyntaxNodePtr {
@@ -374,7 +374,7 @@
Struct(
Struct {
id: StructId(
- 4400,
+ 4000,
),
},
),
@@ -382,7 +382,7 @@
loc: DeclarationLocation {
hir_file_id: MacroFile(
MacroCallId(
- Id(3c00),
+ Id(3800),
),
),
ptr: SyntaxNodePtr {
@@ -411,7 +411,7 @@
Struct(
Struct {
id: StructId(
- 4405,
+ 4005,
),
},
),
@@ -419,7 +419,7 @@
loc: DeclarationLocation {
hir_file_id: FileId(
EditionedFileId(
- Id(2800),
+ Id(2400),
),
),
ptr: SyntaxNodePtr {
@@ -450,7 +450,7 @@
Struct(
Struct {
id: StructId(
- 4406,
+ 4006,
),
},
),
@@ -458,7 +458,7 @@
loc: DeclarationLocation {
hir_file_id: FileId(
EditionedFileId(
- Id(2800),
+ Id(2400),
),
),
ptr: SyntaxNodePtr {
@@ -489,7 +489,7 @@
Struct(
Struct {
id: StructId(
- 4407,
+ 4007,
),
},
),
@@ -497,7 +497,7 @@
loc: DeclarationLocation {
hir_file_id: FileId(
EditionedFileId(
- Id(2800),
+ Id(2400),
),
),
ptr: SyntaxNodePtr {
@@ -526,7 +526,7 @@
Struct(
Struct {
id: StructId(
- 4402,
+ 4002,
),
},
),
@@ -534,7 +534,7 @@
loc: DeclarationLocation {
hir_file_id: FileId(
EditionedFileId(
- Id(2800),
+ Id(2400),
),
),
ptr: SyntaxNodePtr {
@@ -562,14 +562,14 @@
def: Trait(
Trait {
id: TraitId(
- 5800,
+ 5400,
),
},
),
loc: DeclarationLocation {
hir_file_id: FileId(
EditionedFileId(
- Id(2800),
+ Id(2400),
),
),
ptr: SyntaxNodePtr {
@@ -598,7 +598,7 @@
Macro {
id: Macro2Id(
Macro2Id(
- 4800,
+ 4400,
),
),
},
@@ -606,7 +606,7 @@
loc: DeclarationLocation {
hir_file_id: FileId(
EditionedFileId(
- Id(2800),
+ Id(2400),
),
),
ptr: SyntaxNodePtr {
@@ -635,7 +635,7 @@
Union(
Union {
id: UnionId(
- 5000,
+ 4c00,
),
},
),
@@ -643,7 +643,7 @@
loc: DeclarationLocation {
hir_file_id: FileId(
EditionedFileId(
- Id(2800),
+ Id(2400),
),
),
ptr: SyntaxNodePtr {
@@ -671,14 +671,14 @@
def: Module(
Module {
id: ModuleIdLt {
- [salsa id]: Id(2c01),
+ [salsa id]: Id(2801),
},
},
),
loc: DeclarationLocation {
hir_file_id: FileId(
EditionedFileId(
- Id(2800),
+ Id(2400),
),
),
ptr: SyntaxNodePtr {
@@ -706,14 +706,14 @@
def: Module(
Module {
id: ModuleIdLt {
- [salsa id]: Id(2c02),
+ [salsa id]: Id(2802),
},
},
),
loc: DeclarationLocation {
hir_file_id: FileId(
EditionedFileId(
- Id(2800),
+ Id(2400),
),
),
ptr: SyntaxNodePtr {
@@ -742,7 +742,7 @@
Macro {
id: MacroRulesId(
MacroRulesId(
- 3801,
+ 3401,
),
),
},
@@ -750,7 +750,7 @@
loc: DeclarationLocation {
hir_file_id: FileId(
EditionedFileId(
- Id(2800),
+ Id(2400),
),
),
ptr: SyntaxNodePtr {
@@ -778,14 +778,14 @@
def: Function(
FunctionId(
FunctionId(
- 5c02,
+ 5802,
),
),
),
loc: DeclarationLocation {
hir_file_id: FileId(
EditionedFileId(
- Id(2800),
+ Id(2400),
),
),
ptr: SyntaxNodePtr {
@@ -815,14 +815,14 @@
def: Function(
FunctionId(
FunctionId(
- 5c01,
+ 5801,
),
),
),
loc: DeclarationLocation {
hir_file_id: FileId(
EditionedFileId(
- Id(2800),
+ Id(2400),
),
),
ptr: SyntaxNodePtr {
@@ -853,7 +853,7 @@
Macro {
id: MacroRulesId(
MacroRulesId(
- 3800,
+ 3400,
),
),
},
@@ -861,7 +861,7 @@
loc: DeclarationLocation {
hir_file_id: FileId(
EditionedFileId(
- Id(2800),
+ Id(2400),
),
),
ptr: SyntaxNodePtr {
@@ -889,14 +889,14 @@
def: Function(
FunctionId(
FunctionId(
- 5c00,
+ 5800,
),
),
),
loc: DeclarationLocation {
hir_file_id: FileId(
EditionedFileId(
- Id(2800),
+ Id(2400),
),
),
ptr: SyntaxNodePtr {
@@ -925,7 +925,7 @@
Macro {
id: MacroRulesId(
MacroRulesId(
- 3801,
+ 3401,
),
),
},
@@ -933,7 +933,7 @@
loc: DeclarationLocation {
hir_file_id: FileId(
EditionedFileId(
- Id(2800),
+ Id(2400),
),
),
ptr: SyntaxNodePtr {
@@ -961,14 +961,14 @@
def: Function(
FunctionId(
FunctionId(
- 5c03,
+ 5803,
),
),
),
loc: DeclarationLocation {
hir_file_id: FileId(
EditionedFileId(
- Id(2800),
+ Id(2400),
),
),
ptr: SyntaxNodePtr {
@@ -998,7 +998,7 @@
(
Module {
id: ModuleIdLt {
- [salsa id]: Id(2c01),
+ [salsa id]: Id(2801),
},
},
[
@@ -1008,7 +1008,7 @@
Struct(
Struct {
id: StructId(
- 4403,
+ 4003,
),
},
),
@@ -1016,7 +1016,7 @@
loc: DeclarationLocation {
hir_file_id: FileId(
EditionedFileId(
- Id(2800),
+ Id(2400),
),
),
ptr: SyntaxNodePtr {
@@ -1044,7 +1044,7 @@
(
Module {
id: ModuleIdLt {
- [salsa id]: Id(2c02),
+ [salsa id]: Id(2802),
},
},
[
@@ -1053,14 +1053,14 @@
def: Trait(
Trait {
id: TraitId(
- 5800,
+ 5400,
),
},
),
loc: DeclarationLocation {
hir_file_id: FileId(
EditionedFileId(
- Id(2801),
+ Id(2401),
),
),
ptr: SyntaxNodePtr {
@@ -1089,7 +1089,7 @@
Macro {
id: Macro2Id(
Macro2Id(
- 4800,
+ 4400,
),
),
},
@@ -1097,7 +1097,7 @@
loc: DeclarationLocation {
hir_file_id: FileId(
EditionedFileId(
- Id(2801),
+ Id(2401),
),
),
ptr: SyntaxNodePtr {
@@ -1126,7 +1126,7 @@
Struct(
Struct {
id: StructId(
- 4404,
+ 4004,
),
},
),
@@ -1134,7 +1134,7 @@
loc: DeclarationLocation {
hir_file_id: FileId(
EditionedFileId(
- Id(2801),
+ Id(2401),
),
),
ptr: SyntaxNodePtr {
@@ -1163,7 +1163,7 @@
Macro {
id: Macro2Id(
Macro2Id(
- 4800,
+ 4400,
),
),
},
@@ -1171,7 +1171,7 @@
loc: DeclarationLocation {
hir_file_id: FileId(
EditionedFileId(
- Id(2801),
+ Id(2401),
),
),
ptr: SyntaxNodePtr {
@@ -1200,7 +1200,7 @@
Struct(
Struct {
id: StructId(
- 4404,
+ 4004,
),
},
),
@@ -1208,7 +1208,7 @@
loc: DeclarationLocation {
hir_file_id: FileId(
EditionedFileId(
- Id(2801),
+ Id(2401),
),
),
ptr: SyntaxNodePtr {
diff --git a/crates/ide-db/src/test_data/test_symbols_exclude_imports.txt b/crates/ide-db/src/test_data/test_symbols_exclude_imports.txt
index 03e02b3985..b03d926efe 100644
--- a/crates/ide-db/src/test_data/test_symbols_exclude_imports.txt
+++ b/crates/ide-db/src/test_data/test_symbols_exclude_imports.txt
@@ -5,7 +5,7 @@
Struct(
Struct {
id: StructId(
- 3800,
+ 3400,
),
},
),
@@ -13,7 +13,7 @@
loc: DeclarationLocation {
hir_file_id: FileId(
EditionedFileId(
- Id(2801),
+ Id(2401),
),
),
ptr: SyntaxNodePtr {
diff --git a/crates/ide-db/src/test_data/test_symbols_with_imports.txt b/crates/ide-db/src/test_data/test_symbols_with_imports.txt
index 02b8d37958..84bb6670d7 100644
--- a/crates/ide-db/src/test_data/test_symbols_with_imports.txt
+++ b/crates/ide-db/src/test_data/test_symbols_with_imports.txt
@@ -5,7 +5,7 @@
Struct(
Struct {
id: StructId(
- 3800,
+ 3400,
),
},
),
@@ -13,7 +13,7 @@
loc: DeclarationLocation {
hir_file_id: FileId(
EditionedFileId(
- Id(2801),
+ Id(2401),
),
),
ptr: SyntaxNodePtr {
@@ -42,7 +42,7 @@
Struct(
Struct {
id: StructId(
- 3800,
+ 3400,
),
},
),
@@ -50,7 +50,7 @@
loc: DeclarationLocation {
hir_file_id: FileId(
EditionedFileId(
- Id(2800),
+ Id(2400),
),
),
ptr: SyntaxNodePtr {