From 9f61d00d9ab33e36b86be8f6d61fcf14011b85f4 Mon Sep 17 00:00:00 2001 From: Oliver Scherer Date: Sat, 3 Nov 2018 23:29:51 +0100 Subject: [PATCH] Ensure large enough stack on all jobs, not just at the query call site --- src/librustc/ty/query/plumbing.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/librustc/ty/query/plumbing.rs b/src/librustc/ty/query/plumbing.rs index 0bb7dfc218c23..b2d052b66ae2c 100644 --- a/src/librustc/ty/query/plumbing.rs +++ b/src/librustc/ty/query/plumbing.rs @@ -205,7 +205,7 @@ impl<'a, 'tcx, Q: QueryDescription<'tcx>> JobOwner<'a, 'tcx, Q> { // Use the ImplicitCtxt while we execute the query tls::enter_context(&new_icx, |_| { - compute(tcx) + ::middle::recursion_limit::ensure_sufficient_stack(|| compute(tcx)) }) }); @@ -540,7 +540,7 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> { p.record_query(Q::CATEGORY); }); - let res = ::middle::recursion_limit::ensure_sufficient_stack(|| job.start(self, |tcx| { + let res = job.start(self, |tcx| { if dep_node.kind.is_eval_always() { tcx.dep_graph.with_eval_always_task(dep_node, tcx, @@ -552,7 +552,7 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> { key, Q::compute) } - })); + }); self.sess.profiler(|p| p.end_activity(Q::CATEGORY)); profq_msg!(self, ProfileQueriesMsg::ProviderEnd);