mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-29 02:52:11 +00:00
Revert "Turn BlockId into a #[salsa::tracked]"
This reverts commit 8643a858db.
This commit is contained in:
parent
6807f60ccd
commit
6301c35cf3
5 changed files with 19 additions and 39 deletions
|
|
@ -11,7 +11,7 @@ use base_db::FxIndexSet;
|
|||
use cfg::CfgOptions;
|
||||
use either::Either;
|
||||
use hir_expand::{
|
||||
HirFileId, InFile, Intern, MacroDefId,
|
||||
HirFileId, InFile, MacroDefId,
|
||||
mod_path::tool_path,
|
||||
name::{AsName, Name},
|
||||
span_map::SpanMapRef,
|
||||
|
|
@ -2148,7 +2148,7 @@ impl ExprCollector<'_> {
|
|||
) -> ExprId {
|
||||
let block_id = self.expander.ast_id_map().ast_id_for_block(&block).map(|file_local_id| {
|
||||
let ast_id = self.expander.in_file(file_local_id);
|
||||
BlockLoc { ast_id, module: self.module }.intern(self.db)
|
||||
self.db.intern_block(BlockLoc { ast_id, module: self.module })
|
||||
});
|
||||
|
||||
let (module, def_map) =
|
||||
|
|
|
|||
|
|
@ -189,8 +189,8 @@ fn f() {
|
|||
}
|
||||
"#,
|
||||
expect![[r#"
|
||||
BlockIdLt { [salsa id]: Id(3c01) } in BlockRelativeModuleId { block: Some(BlockIdLt { [salsa id]: Id(3c00) }), local_id: Idx::<ModuleData>(1) }
|
||||
BlockIdLt { [salsa id]: Id(3c00) } in BlockRelativeModuleId { block: None, local_id: Idx::<ModuleData>(0) }
|
||||
BlockId(3c01) in BlockRelativeModuleId { block: Some(BlockId(3c00)), local_id: Idx::<ModuleData>(1) }
|
||||
BlockId(3c00) in BlockRelativeModuleId { block: None, local_id: Idx::<ModuleData>(0) }
|
||||
crate scope
|
||||
"#]],
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue