Skip to content

Commit 7841fc6

Browse files
committed
Revert "Use a reduced recursion limit in the MIR inliner's cycle breaker"
This reverts commit 950437a.
1 parent 1a1cc05 commit 7841fc6

File tree

1 file changed

+1
-9
lines changed
  • compiler/rustc_mir_transform/src/inline

1 file changed

+1
-9
lines changed

Diff for: compiler/rustc_mir_transform/src/inline/cycle.rs

+1-9
Original file line numberDiff line numberDiff line change
@@ -136,14 +136,6 @@ pub(crate) fn mir_callgraph_reachable<'tcx>(
136136
}
137137
false
138138
}
139-
// FIXME(-Znext-solver): Remove this hack when trait solver overflow can return an error.
140-
// In code like that pointed out in #128887, the type complexity we ask the solver to deal with
141-
// grows as we recurse into the call graph. If we use the same recursion limit here and in the
142-
// solver, the solver hits the limit first and emits a fatal error. But if we use a reduced
143-
// limit, we will hit the limit first and give up on looking for inlining. And in any case,
144-
// the default recursion limits are quite generous for us. If we need to recurse 64 times
145-
// into the call graph, we're probably not going to find any useful MIR inlining.
146-
let recursion_limit = tcx.recursion_limit() / 2;
147139
process(
148140
tcx,
149141
param_env,
@@ -152,7 +144,7 @@ pub(crate) fn mir_callgraph_reachable<'tcx>(
152144
&mut Vec::new(),
153145
&mut FxHashSet::default(),
154146
&mut FxHashMap::default(),
155-
recursion_limit,
147+
tcx.recursion_limit(),
156148
)
157149
}
158150

0 commit comments

Comments
 (0)