Skip to content

Commit 7272552

Browse files
committed
clean up local_overflow_limit computation
fixes bors snafu where it merged an outdated commit and missed this change
1 parent 7659abc commit 7272552

File tree

1 file changed

+1
-5
lines changed
  • compiler/rustc_trait_selection/src/solve/search_graph

1 file changed

+1
-5
lines changed

compiler/rustc_trait_selection/src/solve/search_graph/mod.rs

+1-5
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,9 @@ pub(super) struct SearchGraph<'tcx> {
5151

5252
impl<'tcx> SearchGraph<'tcx> {
5353
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-
};
5854
Self {
5955
mode,
60-
local_overflow_limit,
56+
local_overflow_limit: tcx.recursion_limit().0.checked_ilog2().unwrap_or(0) as usize,
6157
stack: Default::default(),
6258
provisional_cache: ProvisionalCache::empty(),
6359
}

0 commit comments

Comments
 (0)