Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit ad7c4cf

Browse files
Avoid relying on block_def_map() needlessly
We can compute the wanted information from the block's interned data.
1 parent a2083a5 commit ad7c4cf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/tools/rust-analyzer/crates/hir-ty/src/chalk_db.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ impl ChalkContext<'_> {
553553

554554
let block_impls = iter::successors(self.block, |&block_id| {
555555
cov_mark::hit!(block_local_impls);
556-
self.db.block_def_map(block_id).parent().and_then(|module| module.containing_block())
556+
block_id.loc(self.db).module.containing_block()
557557
})
558558
.inspect(|&block_id| {
559559
// make sure we don't search the same block twice

0 commit comments

Comments
 (0)