about summary refs log tree commit diff
path: root/compiler/rustc_span/src
diff options
context:
space:
mode:
authorMichael Woerister <michaelwoerister@posteo>2021-06-21 15:30:16 +0200
committerMichael Woerister <michaelwoerister@posteo>2021-06-21 15:30:16 +0200
commitc3c4ab5ed204b09a8446f9abbdb4d49b278756be (patch)
treef6ed5e07fc38cb2e8f074f7ceb884dcf0ff6a158 /compiler/rustc_span/src
parent47327145e3babaeef39e8bf41ebaeaf1ccab0d63 (diff)
downloadrust-c3c4ab5ed204b09a8446f9abbdb4d49b278756be.tar.gz
rust-c3c4ab5ed204b09a8446f9abbdb4d49b278756be.zip
Encode SourceFile source crate as StableCrateId in incr. comp. OnDiskCache.
Diffstat (limited to 'compiler/rustc_span/src')
-rw-r--r--compiler/rustc_span/src/source_map.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_span/src/source_map.rs b/compiler/rustc_span/src/source_map.rs
index 44656343979..32031ac7071 100644
--- a/compiler/rustc_span/src/source_map.rs
+++ b/compiler/rustc_span/src/source_map.rs
@@ -133,13 +133,13 @@ impl FileLoader for RealFileLoader {
 pub struct StableSourceFileId {
     // A hash of the source file's FileName. This is hash so that it's size
     // is more predictable than if we included the actual FileName value.
-    file_name_hash: u64,
+    pub file_name_hash: u64,
 
     // The CrateNum of the crate this source file was originally parsed for.
     // We cannot include this information in the hash because at the time
     // of hashing we don't have the context to map from the CrateNum's numeric
     // value to a StableCrateId.
-    cnum: CrateNum,
+    pub cnum: CrateNum,
 }
 
 // FIXME: we need a more globally consistent approach to the problem solved by