Skip to content

Commit 9f61d00

Browse files
committed
Ensure large enough stack on all jobs, not just at the query call site
1 parent 4e8f211 commit 9f61d00

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/librustc/ty/query/plumbing.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ impl<'a, 'tcx, Q: QueryDescription<'tcx>> JobOwner<'a, 'tcx, Q> {
205205

206206
// Use the ImplicitCtxt while we execute the query
207207
tls::enter_context(&new_icx, |_| {
208-
compute(tcx)
208+
::middle::recursion_limit::ensure_sufficient_stack(|| compute(tcx))
209209
})
210210
});
211211

@@ -540,7 +540,7 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
540540
p.record_query(Q::CATEGORY);
541541
});
542542

543-
let res = ::middle::recursion_limit::ensure_sufficient_stack(|| job.start(self, |tcx| {
543+
let res = job.start(self, |tcx| {
544544
if dep_node.kind.is_eval_always() {
545545
tcx.dep_graph.with_eval_always_task(dep_node,
546546
tcx,
@@ -552,7 +552,7 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
552552
key,
553553
Q::compute)
554554
}
555-
}));
555+
});
556556

557557
self.sess.profiler(|p| p.end_activity(Q::CATEGORY));
558558
profq_msg!(self, ProfileQueriesMsg::ProviderEnd);

0 commit comments

Comments
 (0)