add ensure_sufficient_stack
to the new solver
This commit is contained in:
parent
ae3c353067
commit
c0468313cb
1 changed files with 21 additions and 18 deletions
|
@ -1,3 +1,4 @@
|
||||||
|
use rustc_data_structures::stack::ensure_sufficient_stack;
|
||||||
use rustc_hir::def_id::{DefId, LocalDefId};
|
use rustc_hir::def_id::{DefId, LocalDefId};
|
||||||
use rustc_infer::infer::at::ToTrace;
|
use rustc_infer::infer::at::ToTrace;
|
||||||
use rustc_infer::infer::canonical::CanonicalVarValues;
|
use rustc_infer::infer::canonical::CanonicalVarValues;
|
||||||
|
@ -305,24 +306,26 @@ impl<'a, 'tcx> EvalCtxt<'a, 'tcx> {
|
||||||
// Deal with overflow, caching, and coinduction.
|
// Deal with overflow, caching, and coinduction.
|
||||||
//
|
//
|
||||||
// The actual solver logic happens in `ecx.compute_goal`.
|
// The actual solver logic happens in `ecx.compute_goal`.
|
||||||
search_graph.with_new_goal(
|
ensure_sufficient_stack(|| {
|
||||||
tcx,
|
search_graph.with_new_goal(
|
||||||
canonical_input,
|
tcx,
|
||||||
goal_evaluation,
|
canonical_input,
|
||||||
|search_graph, goal_evaluation| {
|
goal_evaluation,
|
||||||
EvalCtxt::enter_canonical(
|
|search_graph, goal_evaluation| {
|
||||||
tcx,
|
EvalCtxt::enter_canonical(
|
||||||
search_graph,
|
tcx,
|
||||||
canonical_input,
|
search_graph,
|
||||||
goal_evaluation,
|
canonical_input,
|
||||||
|ecx, goal| {
|
goal_evaluation,
|
||||||
let result = ecx.compute_goal(goal);
|
|ecx, goal| {
|
||||||
ecx.inspect.query_result(result);
|
let result = ecx.compute_goal(goal);
|
||||||
result
|
ecx.inspect.query_result(result);
|
||||||
},
|
result
|
||||||
)
|
},
|
||||||
},
|
)
|
||||||
)
|
},
|
||||||
|
)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Recursively evaluates `goal`, returning whether any inference vars have
|
/// Recursively evaluates `goal`, returning whether any inference vars have
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue