Freeze Definitions
earlier
This commit is contained in:
parent
6881eed8f6
commit
ac54d49572
1 changed files with 4 additions and 0 deletions
|
@ -237,6 +237,10 @@ pub fn check_crate(tcx: TyCtxt<'_>) -> Result<(), ErrorGuaranteed> {
|
||||||
tcx.hir().for_each_module(|module| tcx.ensure().check_mod_item_types(module))
|
tcx.hir().for_each_module(|module| tcx.ensure().check_mod_item_types(module))
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Freeze definitions as we don't add new ones at this point. This improves performance by
|
||||||
|
// allowing lock-free access to them.
|
||||||
|
tcx.untracked().definitions.freeze();
|
||||||
|
|
||||||
// FIXME: Remove this when we implement creating `DefId`s
|
// FIXME: Remove this when we implement creating `DefId`s
|
||||||
// for anon constants during their parents' typeck.
|
// for anon constants during their parents' typeck.
|
||||||
// Typeck all body owners in parallel will produce queries
|
// Typeck all body owners in parallel will produce queries
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue