Skip to content

Commit 2d99b5e

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

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/hir-ty/src/chalk_db.rs

+1-1
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)