Skip to content

Commit

Permalink
handle edge-case of a recursion limit of 0
Browse files Browse the repository at this point in the history
  • Loading branch information
lqd committed Aug 29, 2023
1 parent bb90f81 commit 0e1e964
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ impl<'tcx> SearchGraph<'tcx> {
pub(super) fn new(tcx: TyCtxt<'tcx>, mode: SolverMode) -> SearchGraph<'tcx> {
Self {
mode,
local_overflow_limit: tcx.recursion_limit().0.ilog2() as usize,
local_overflow_limit: tcx.recursion_limit().0.checked_ilog2().unwrap_or(0) as usize,
stack: Default::default(),
provisional_cache: ProvisionalCache::empty(),
}
Expand Down

0 comments on commit 0e1e964

Please sign in to comment.