diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2021-05-17 21:07:42 +0200 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2022-04-02 23:23:19 +0200 |
| commit | 2d3d9b26a424dc48b49a17c39159a3caaea9c3bf (patch) | |
| tree | 082a93bac8611908fbf51b7dccb4a0296aa95ba7 | |
| parent | e1b36f5ae24fcae7f987acdc1fe20044451b2e3c (diff) | |
| download | rust-2d3d9b26a424dc48b49a17c39159a3caaea9c3bf.tar.gz rust-2d3d9b26a424dc48b49a17c39159a3caaea9c3bf.zip | |
Use only local hash.
| -rw-r--r-- | compiler/rustc_mir_transform/src/inline.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_mir_transform/src/inline.rs b/compiler/rustc_mir_transform/src/inline.rs index 1f8f1fa8371..22e16f9231a 100644 --- a/compiler/rustc_mir_transform/src/inline.rs +++ b/compiler/rustc_mir_transform/src/inline.rs @@ -216,8 +216,8 @@ impl<'tcx> Inliner<'tcx> { // 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) - < self.tcx.def_path_hash(callee_def_id.to_def_id()) + if self.tcx.def_path_hash(caller_def_id).local_hash() + < self.tcx.def_path_hash(callee_def_id.to_def_id()).local_hash() { return Ok(()); } |
