/// add it to the "We don't have enough information to reconstruct..." group in
/// the match below.
pub fn force_from_dep_node<'tcx>(tcx: TyCtxt<'tcx>, dep_node: &DepNode) -> bool {
- use crate::dep_graph::DepKind;
-
// We must avoid ever having to call `force_from_dep_node()` for a
// `DepNode::codegen_unit`:
// Since we cannot reconstruct the query key of a `DepNode::codegen_unit`, we
// hit the cache instead of having to go through `force_from_dep_node`.
// This assertion makes sure, we actually keep applying the solution above.
debug_assert!(
- dep_node.kind != DepKind::codegen_unit,
+ dep_node.kind != crate::dep_graph::DepKind::codegen_unit,
"calling force_from_dep_node() on DepKind::codegen_unit"
);
rustc_dep_node_force!([dep_node, tcx]
// These are inputs that are expected to be pre-allocated and that
// should therefore always be red or green already.
- DepKind::CrateMetadata |
+ crate::dep_graph::DepKind::CrateMetadata |
// These are anonymous nodes.
- DepKind::TraitSelect |
+ crate::dep_graph::DepKind::TraitSelect |
// We don't have enough information to reconstruct the query key of
// these.
- DepKind::CompileCodegenUnit => {
+ crate::dep_graph::DepKind::CompileCodegenUnit => {
bug!("force_from_dep_node: encountered {:?}", dep_node)
}
);
}
pub(crate) fn try_load_from_on_disk_cache<'tcx>(tcx: TyCtxt<'tcx>, dep_node: &DepNode) {
- use crate::dep_graph::DepKind;
-
rustc_dep_node_try_load_from_on_disk_cache!(dep_node, tcx)
}
});
try_load_from_on_disk_cache_stream.extend(quote! {
- DepKind::#name => {
+ ::rustc::dep_graph::DepKind::#name => {
if <#arg as DepNodeParams<TyCtxt<'_>>>::CAN_RECONSTRUCT_QUERY_KEY {
debug_assert!($tcx.dep_graph
.node_color($dep_node)
// Add a match arm to force the query given the dep node
dep_node_force_stream.extend(quote! {
- DepKind::#name => {
+ ::rustc::dep_graph::DepKind::#name => {
if <#arg as DepNodeParams<TyCtxt<'_>>>::CAN_RECONSTRUCT_QUERY_KEY {
if let Some(key) = <#arg as DepNodeParams<TyCtxt<'_>>>::recover($tcx, $dep_node) {
$tcx.force_query::<crate::ty::query::queries::#name<'_>>(
}
dep_node_force_stream.extend(quote! {
- DepKind::Null => {
+ ::rustc::dep_graph::DepKind::Null => {
bug!("Cannot force dep node: {:?}", $dep_node)
}
});