File tree 1 file changed +1
-9
lines changed
compiler/rustc_mir_transform/src/inline
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>(
136
136
}
137
137
false
138
138
}
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 ;
147
139
process (
148
140
tcx,
149
141
param_env,
@@ -152,7 +144,7 @@ pub(crate) fn mir_callgraph_reachable<'tcx>(
152
144
& mut Vec :: new ( ) ,
153
145
& mut FxHashSet :: default ( ) ,
154
146
& mut FxHashMap :: default ( ) ,
155
- recursion_limit,
147
+ tcx . recursion_limit ( ) ,
156
148
)
157
149
}
158
150
You can’t perform that action at this time.
0 commit comments