summary refs log tree commit diff
path: root/compiler/rustc_metadata/src/rmeta/decoder.rs
diff options
context:
space:
mode:
authorCamille GILLOT <gillot.camille@gmail.com>2022-04-10 11:14:58 +0200
committerCamille GILLOT <gillot.camille@gmail.com>2022-04-10 14:53:30 +0200
commit6142f50845171bba9975be096f0fd4ea2a056fdf (patch)
tree3dc040772de5c6f04362cd3a5ee5c104c1ca398e /compiler/rustc_metadata/src/rmeta/decoder.rs
parent72be5b81df7d038411ea0f88f6ef351e386aca9c (diff)
downloadrust-6142f50845171bba9975be096f0fd4ea2a056fdf.tar.gz
rust-6142f50845171bba9975be096f0fd4ea2a056fdf.zip
Directly encode DefPathHash in metadata.
Diffstat (limited to 'compiler/rustc_metadata/src/rmeta/decoder.rs')
-rw-r--r--compiler/rustc_metadata/src/rmeta/decoder.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_metadata/src/rmeta/decoder.rs b/compiler/rustc_metadata/src/rmeta/decoder.rs
index ef1debf4344..7b500f1565d 100644
--- a/compiler/rustc_metadata/src/rmeta/decoder.rs
+++ b/compiler/rustc_metadata/src/rmeta/decoder.rs
@@ -1459,9 +1459,9 @@ impl<'a, 'tcx> CrateMetadataRef<'a> {
         index: DefIndex,
         def_path_hashes: &mut FxHashMap<DefIndex, DefPathHash>,
     ) -> DefPathHash {
-        *def_path_hashes.entry(index).or_insert_with(|| {
-            self.root.tables.def_path_hashes.get(self, index).unwrap().decode(self)
-        })
+        *def_path_hashes
+            .entry(index)
+            .or_insert_with(|| self.root.tables.def_path_hashes.get(self, index).unwrap())
     }
 
     #[inline]