]> git.lizzy.rs Git - rust.git/commitdiff
Always hash spans in expn.
authorCamille GILLOT <gillot.camille@gmail.com>
Sun, 27 Jun 2021 19:30:20 +0000 (21:30 +0200)
committerCamille GILLOT <gillot.camille@gmail.com>
Sat, 17 Jul 2021 17:41:11 +0000 (19:41 +0200)
compiler/rustc_middle/src/ty/query/on_disk_cache.rs

index 03e3ca5ec6b8b0e7294f9c96d29811ee8d8d1144..c4847ea16c5625c535faf557c592dcdbecabd5f6 100644 (file)
@@ -835,7 +835,7 @@ fn decode(decoder: &mut CacheDecoder<'a, 'tcx>) -> Result<Self, String> {
             use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
             let mut hcx = decoder.tcx.create_stable_hashing_context();
             let mut hasher = StableHasher::new();
-            expn_id.expn_data().hash_stable(&mut hcx, &mut hasher);
+            hcx.while_hashing_spans(true, |hcx| expn_id.expn_data().hash_stable(hcx, &mut hasher));
             let local_hash: u64 = hasher.finish();
             debug_assert_eq!(hash.local_hash(), local_hash);
         }