about summary refs log tree commit diff
path: root/compiler/rustc_span/src
diff options
context:
space:
mode:
authorBen Kimock <kimockb@gmail.com>2023-04-15 13:53:50 -0400
committerBen Kimock <kimockb@gmail.com>2023-04-16 20:05:02 -0400
commit84facac97a3a13a1ea29b227d55513b58ffe7692 (patch)
tree326f52214aeaf6caee30721d55f294099662efdd /compiler/rustc_span/src
parentfd57c6b407d5f038060d7b94ce9af22ea4b0dcf0 (diff)
downloadrust-84facac97a3a13a1ea29b227d55513b58ffe7692.tar.gz
rust-84facac97a3a13a1ea29b227d55513b58ffe7692.zip
Remove some unnecessary hash truncations
Diffstat (limited to 'compiler/rustc_span/src')
-rw-r--r--compiler/rustc_span/src/lib.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/compiler/rustc_span/src/lib.rs b/compiler/rustc_span/src/lib.rs
index aa8859ed1a3..16583582933 100644
--- a/compiler/rustc_span/src/lib.rs
+++ b/compiler/rustc_span/src/lib.rs
@@ -2159,9 +2159,7 @@ where
         };
 
         Hash::hash(&TAG_VALID_SPAN, hasher);
-        // We truncate the stable ID hash and line and column numbers. The chances
-        // of causing a collision this way should be minimal.
-        Hash::hash(&(file.name_hash as u64), hasher);
+        Hash::hash(&file.name_hash, hasher);
 
         // Hash both the length and the end location (line/column) of a span. If we
         // hash only the length, for example, then two otherwise equal spans with