Skip to content

Commit 6698106

Browse files
Merge pull request rust-lang#19492 from ChayimFriedman2/experiment
Avoid relying on `block_def_map()` needlessly
2 parents 409e0ac + ad7c4cf commit 6698106

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
@@ -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)