This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +1
-9
lines changed
compiler/rustc_mir_transform/src/inline Expand file tree Collapse file tree 1 file changed +1
-9
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments