mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 11:20:54 +00:00
Avoid relying on block_def_map()
needlessly
We can compute the wanted information from the block's interned data.
This commit is contained in:
parent
fb133c8c80
commit
2d99b5ead5
@ -553,7 +553,7 @@ impl ChalkContext<'_> {
|
||||
|
||||
let block_impls = iter::successors(self.block, |&block_id| {
|
||||
cov_mark::hit!(block_local_impls);
|
||||
self.db.block_def_map(block_id).parent().and_then(|module| module.containing_block())
|
||||
block_id.loc(self.db).module.containing_block()
|
||||
})
|
||||
.inspect(|&block_id| {
|
||||
// make sure we don't search the same block twice
|
||||
|
Loading…
x
Reference in New Issue
Block a user