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:
parent
497c9a256b
commit
62139ffad4
9 changed files with 24 additions and 107 deletions
|
@ -214,17 +214,6 @@ pub mod dep_kind {
|
|||
try_load_from_on_disk_cache: |_, _| {},
|
||||
};
|
||||
|
||||
// Represents metadata from an extern crate.
|
||||
pub const CrateMetadata: DepKindStruct = DepKindStruct {
|
||||
has_params: true,
|
||||
is_anon: false,
|
||||
is_eval_always: true,
|
||||
|
||||
can_reconstruct_query_key: || true,
|
||||
force_from_dep_node: |_, dep_node| bug!("force_from_dep_node: encountered {:?}", dep_node),
|
||||
try_load_from_on_disk_cache: |_, _| {},
|
||||
};
|
||||
|
||||
pub const TraitSelect: DepKindStruct = DepKindStruct {
|
||||
has_params: false,
|
||||
is_anon: true,
|
||||
|
@ -379,9 +368,6 @@ rustc_dep_node_append!([define_dep_nodes!][ <'tcx>
|
|||
// We use this for most things when incr. comp. is turned off.
|
||||
[] Null,
|
||||
|
||||
// Represents metadata from an extern crate.
|
||||
[eval_always] CrateMetadata(CrateNum),
|
||||
|
||||
[anon] TraitSelect,
|
||||
|
||||
[] CompileCodegenUnit(Symbol),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue