We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 249624b + 838c879 commit 2648bc7Copy full SHA for 2648bc7
compiler/rustc_mir_transform/src/inline.rs
@@ -336,16 +336,6 @@ impl<'tcx> Inliner<'tcx> {
336
}
337
338
if callee_def_id.is_local() {
339
- // Avoid a cycle here by only using `instance_mir` only if we have
340
- // a lower `DefPathHash` than the callee. This ensures that the callee will
341
- // not inline us. This trick even works with incremental compilation,
342
- // since `DefPathHash` is stable.
343
- if self.tcx.def_path_hash(caller_def_id).local_hash()
344
- < self.tcx.def_path_hash(callee_def_id).local_hash()
345
- {
346
- return Ok(());
347
- }
348
-
349
// If we know for sure that the function we're calling will itself try to
350
// call us, then we avoid inlining that function.
351
if self.tcx.mir_callgraph_reachable((*callee, caller_def_id.expect_local())) {
0 commit comments