From 9835e2ae736235810b4ea1c162ca5e65c547e770 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 18 May 2024 04:49:50 +0200 Subject: Merging upstream version 1.71.1+dfsg1. Signed-off-by: Daniel Baumann --- compiler/rustc_middle/src/dep_graph/dep_node.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'compiler/rustc_middle/src/dep_graph') diff --git a/compiler/rustc_middle/src/dep_graph/dep_node.rs b/compiler/rustc_middle/src/dep_graph/dep_node.rs index 865bb70af..2dc5b8969 100644 --- a/compiler/rustc_middle/src/dep_graph/dep_node.rs +++ b/compiler/rustc_middle/src/dep_graph/dep_node.rs @@ -357,20 +357,20 @@ impl<'tcx> DepNodeParams> for HirId { Fingerprint::new( // `owner` is local, so is completely defined by the local hash def_path_hash.local_hash(), - local_id.as_u32().into(), + local_id.as_u32() as u64, ) } #[inline(always)] fn to_debug_str(&self, tcx: TyCtxt<'tcx>) -> String { let HirId { owner, local_id } = *self; - format!("{}.{}", tcx.def_path_str(owner.to_def_id()), local_id.as_u32()) + format!("{}.{}", tcx.def_path_str(owner), local_id.as_u32()) } #[inline(always)] fn recover(tcx: TyCtxt<'tcx>, dep_node: &DepNode) -> Option { if tcx.fingerprint_style(dep_node.kind) == FingerprintStyle::HirId { - let (local_hash, local_id) = Fingerprint::from(dep_node.hash).as_value(); + let (local_hash, local_id) = Fingerprint::from(dep_node.hash).split(); let def_path_hash = DefPathHash::new(tcx.sess.local_stable_crate_id(), local_hash); let def_id = tcx .def_path_hash_to_def_id(def_path_hash, &mut || { @@ -378,6 +378,7 @@ impl<'tcx> DepNodeParams> for HirId { }) .expect_local(); let local_id = local_id + .as_u64() .try_into() .unwrap_or_else(|_| panic!("local id should be u32, found {:?}", local_id)); Some(HirId { owner: OwnerId { def_id }, local_id: ItemLocalId::from_u32(local_id) }) -- cgit v1.2.3