diff --git a/compiler/rustc_mir_transform/src/inline/cycle.rs b/compiler/rustc_mir_transform/src/inline/cycle.rs index 25a9baffe582d..8b49ea3f8a217 100644 --- a/compiler/rustc_mir_transform/src/inline/cycle.rs +++ b/compiler/rustc_mir_transform/src/inline/cycle.rs @@ -162,9 +162,9 @@ pub(crate) fn mir_callgraph_cyclic<'tcx>( // grows as we recurse into the call graph. If we use the same recursion limit here and in the // solver, the solver hits the limit first and emits a fatal error. But if we use a reduced // limit, we will hit the limit first and give up on looking for inlining. And in any case, - // the default recursion limits are quite generous for us. If we need to recurse 64 times + // the default recursion limits are quite generous for us. If we need to recurse 16 times // into the call graph, we're probably not going to find any useful MIR inlining. - let recursion_limit = tcx.recursion_limit() / 2; + let recursion_limit = tcx.recursion_limit() / 8; let mut involved = FxHashSet::default(); let typing_env = ty::TypingEnv::post_analysis(tcx, root); let root_instance = diff --git a/tests/crashes/131342.rs b/tests/crashes/131342.rs deleted file mode 100644 index f4404092917a4..0000000000000 --- a/tests/crashes/131342.rs +++ /dev/null @@ -1,15 +0,0 @@ -//@ known-bug: #131342 - -fn main() { - let mut items = vec![1, 2, 3, 4, 5].into_iter(); - problem_thingy(&mut items); -} - -fn problem_thingy(items: &mut impl Iterator) { - let mut peeker = items.peekable(); - match peeker.peek() { - Some(_) => (), - None => return (), - } - problem_thingy(&mut peeker); -}