Use only local hash.

This commit is contained in:
Camille GILLOT 2021-05-17 21:07:42 +02:00
parent e1b36f5ae2
commit 2d3d9b26a4

View File

@ -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(());
}