Skip to content

Commit f3ed997

Browse files
committed
Move reconstruct test inwards.
1 parent c95a568 commit f3ed997

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

compiler/rustc_query_system/src/query/plumbing.rs

+4-5
Original file line numberDiff line numberDiff line change
@@ -753,7 +753,10 @@ where
753753
CTX: QueryContext,
754754
{
755755
debug_assert!(!query.anon);
756-
debug_assert!(<C::Key as DepNodeParams<CTX::DepContext>>::can_reconstruct_query_key());
756+
757+
if !<C::Key as DepNodeParams<CTX::DepContext>>::can_reconstruct_query_key() {
758+
return false;
759+
}
757760

758761
let key = if let Some(key) =
759762
<C::Key as DepNodeParams<CTX::DepContext>>::recover(*tcx.dep_context(), &dep_node)
@@ -840,9 +843,5 @@ where
840843
return false;
841844
}
842845

843-
if !<Q::Key as DepNodeParams<CTX::DepContext>>::can_reconstruct_query_key() {
844-
return false;
845-
}
846-
847846
force_query_impl(tcx, Q::query_state(tcx), Q::query_cache(tcx), *dep_node, &Q::VTABLE)
848847
}

0 commit comments

Comments
 (0)