Remove DepKind::CrateMetadata and pre-allocation of DepNodes

Remove much of the special-case handling around crate metadata
dependency tracking by replacing `DepKind::CrateMetadata` and the
pre-allocation of corresponding `DepNodes` with on-demand invocation
of the `crate_hash` query.
This commit is contained in:
Tyson Nottingham 2021-01-01 14:06:17 -08:00
parent 497c9a256b
commit 62139ffad4
9 changed files with 24 additions and 107 deletions

View file

@ -797,12 +797,6 @@ pub fn create_global_ctxt<'tcx>(
})
});
// Do some initialization of the DepGraph that can only be done with the tcx available.
let icx = ty::tls::ImplicitCtxt::new(&gcx);
ty::tls::enter_context(&icx, |_| {
icx.tcx.sess.time("dep_graph_tcx_init", || rustc_incremental::dep_graph_tcx_init(icx.tcx));
});
QueryContext(gcx)
}