diff options
| author | Michael Goulet <michael@errs.io> | 2024-09-16 21:41:15 -0400 | 
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2024-09-16 21:41:15 -0400 | 
| commit | 8f97231d34faa8a691d1c35232fc4044fbc67bd5 (patch) | |
| tree | 7c434054fc8642f6261e44f9180f237b1caf5a18 /compiler/rustc_mir_transform/src/inline.rs | |
| parent | c52c23b6f44cd19718721a5e3b2eeb169e9c96ff (diff) | |
| download | rust-8f97231d34faa8a691d1c35232fc4044fbc67bd5.tar.gz rust-8f97231d34faa8a691d1c35232fc4044fbc67bd5.zip | |
Remove semi-nondeterminism of DefPathHash ordering from inliner
Diffstat (limited to 'compiler/rustc_mir_transform/src/inline.rs')
| -rw-r--r-- | compiler/rustc_mir_transform/src/inline.rs | 10 | 
1 files changed, 0 insertions, 10 deletions
| diff --git a/compiler/rustc_mir_transform/src/inline.rs b/compiler/rustc_mir_transform/src/inline.rs index 870cb180ce1..2de75e2ef50 100644 --- a/compiler/rustc_mir_transform/src/inline.rs +++ b/compiler/rustc_mir_transform/src/inline.rs @@ -357,16 +357,6 @@ impl<'tcx> Inliner<'tcx> { } if callee_def_id.is_local() { - // Avoid a cycle here by only using `instance_mir` only if we have - // a lower `DefPathHash` than the callee. This ensures that the callee will - // not inline us. This trick even works with incremental compilation, - // since `DefPathHash` is stable. - if self.tcx.def_path_hash(caller_def_id).local_hash() - < self.tcx.def_path_hash(callee_def_id).local_hash() - { - return Ok(()); - } - // If we know for sure that the function we're calling will itself try to // call us, then we avoid inlining that function. if self.tcx.mir_callgraph_reachable((callee, caller_def_id.expect_local())) { | 
