We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bb90f81 commit 0e1e964Copy full SHA for 0e1e964
compiler/rustc_trait_selection/src/solve/search_graph/mod.rs
@@ -53,7 +53,7 @@ impl<'tcx> SearchGraph<'tcx> {
53
pub(super) fn new(tcx: TyCtxt<'tcx>, mode: SolverMode) -> SearchGraph<'tcx> {
54
Self {
55
mode,
56
- local_overflow_limit: tcx.recursion_limit().0.ilog2() as usize,
+ local_overflow_limit: tcx.recursion_limit().0.checked_ilog2().unwrap_or(0) as usize,
57
stack: Default::default(),
58
provisional_cache: ProvisionalCache::empty(),
59
}
0 commit comments