Skip to content

Commit cdcadb4

Browse files
Merge pull request #19492 from ChayimFriedman2/experiment
Avoid relying on `block_def_map()` needlessly
2 parents 082ebaa + 2d99b5e commit cdcadb4

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
@@ -552,7 +552,7 @@ impl ChalkContext<'_> {
552552

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

0 commit comments

Comments
 (0)