From 2d3d9b26a424dc48b49a17c39159a3caaea9c3bf Mon Sep 17 00:00:00 2001 From: Camille GILLOT <gillot.camille@gmail.com> Date: Mon, 17 May 2021 21:07:42 +0200 Subject: [PATCH] Use only local hash. --- compiler/rustc_mir_transform/src/inline.rs | 4 ++-- 1 file 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(()); }