We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bb90f81 commit 7762ac7Copy full SHA for 7762ac7
compiler/rustc_trait_selection/src/solve/search_graph/mod.rs
@@ -51,9 +51,13 @@ pub(super) struct SearchGraph<'tcx> {
51
52
impl<'tcx> SearchGraph<'tcx> {
53
pub(super) fn new(tcx: TyCtxt<'tcx>, mode: SolverMode) -> SearchGraph<'tcx> {
54
+ let local_overflow_limit = {
55
+ let recursion_limit = tcx.recursion_limit().0;
56
+ if recursion_limit == 0 { 0 } else { recursion_limit.ilog2() as usize }
57
+ };
58
Self {
59
mode,
- local_overflow_limit: tcx.recursion_limit().0.ilog2() as usize,
60
+ local_overflow_limit,
61
stack: Default::default(),
62
provisional_cache: ProvisionalCache::empty(),
63
}
0 commit comments