diff options
| author | bors <bors@rust-lang.org> | 2023-04-17 09:38:31 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-04-17 09:38:31 +0000 |
| commit | e49122fb1ca87a6c3e3c22abb315fc75cfe8daed (patch) | |
| tree | 628b1cea7fda715a40200a5576a9bfa4362286db /compiler/rustc_span/src/lib.rs | |
| parent | bdb32bd4bbcabb0d32a04a0b45e6a8ceaa5e54d6 (diff) | |
| parent | 84facac97a3a13a1ea29b227d55513b58ffe7692 (diff) | |
| download | rust-e49122fb1ca87a6c3e3c22abb315fc75cfe8daed.tar.gz rust-e49122fb1ca87a6c3e3c22abb315fc75cfe8daed.zip | |
Auto merge of #110367 - saethlin:no-truncations, r=oli-obk
Remove some suspicious cast truncations These truncations were added a long time ago, and as best I can tell without a perf justification. And with rust-lang/rust#110410 it has become perf-neutral to not truncate anymore. We worked hard for all these bits, let's use them.
Diffstat (limited to 'compiler/rustc_span/src/lib.rs')
| -rw-r--r-- | compiler/rustc_span/src/lib.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/compiler/rustc_span/src/lib.rs b/compiler/rustc_span/src/lib.rs index 1e9653d0c5b..911d6902c98 100644 --- a/compiler/rustc_span/src/lib.rs +++ b/compiler/rustc_span/src/lib.rs @@ -2160,9 +2160,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 |
