Don't hold the definitions' lock across index_hir

This commit is contained in:
John Kåre Alsaker
2023-08-31 23:14:47 +02:00
parent 0c96a9260b
commit 6881eed8f6
2 changed files with 16 additions and 17 deletions

View File

@@ -671,8 +671,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
} else {
(None, None)
};
let (nodes, parenting) =
index::index_hir(self.tcx.sess, &*self.tcx.definitions_untracked(), node, &bodies);
let (nodes, parenting) = index::index_hir(self.tcx, node, &bodies);
let nodes = hir::OwnerNodes { opt_hash_including_bodies, nodes, bodies };
let attrs = hir::AttributeMap { map: attrs, opt_hash: attrs_hash };