Move reconstruct test inwards.

This commit is contained in:
Camille GILLOT 2021-05-29 22:38:51 +02:00
parent c95a5682f7
commit f3ed997254

View File

@ -753,7 +753,10 @@ where
CTX: QueryContext,
{
debug_assert!(!query.anon);
debug_assert!(<C::Key as DepNodeParams<CTX::DepContext>>::can_reconstruct_query_key());
if !<C::Key as DepNodeParams<CTX::DepContext>>::can_reconstruct_query_key() {
return false;
}
let key = if let Some(key) =
<C::Key as DepNodeParams<CTX::DepContext>>::recover(*tcx.dep_context(), &dep_node)
@ -840,9 +843,5 @@ where
return false;
}
if !<Q::Key as DepNodeParams<CTX::DepContext>>::can_reconstruct_query_key() {
return false;
}
force_query_impl(tcx, Q::query_state(tcx), Q::query_cache(tcx), *dep_node, &Q::VTABLE)
}