about summary refs log tree commit diff
path: root/src/librustc_incremental
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2016-07-21 12:41:29 -0400
committerNiko Matsakis <niko@alum.mit.edu>2016-07-28 12:05:04 -0400
commitffc13b2f80dfe60895bb415175fa246d7247a33c (patch)
treefb945c4dad4a88f85609136da280a93fcd64d9e5 /src/librustc_incremental
parent2b38c4bdea7acf72b8322660de5a4f86d561a65c (diff)
downloadrust-ffc13b2f80dfe60895bb415175fa246d7247a33c.tar.gz
rust-ffc13b2f80dfe60895bb415175fa246d7247a33c.zip
Store `crate_disambiguator` as an `InternedString`
We used to use `Name`, but the session outlives the tokenizer, which
means that attempts to read this field after trans has complete
otherwise panic. All reads want an `InternedString` anyhow.
Diffstat (limited to 'src/librustc_incremental')
-rw-r--r--src/librustc_incremental/calculate_svh.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/librustc_incremental/calculate_svh.rs b/src/librustc_incremental/calculate_svh.rs
index cbc246ac2a1..70704f5dec0 100644
--- a/src/librustc_incremental/calculate_svh.rs
+++ b/src/librustc_incremental/calculate_svh.rs
@@ -36,7 +36,7 @@ impl<'a, 'tcx> SvhCalculate for TyCtxt<'a, 'tcx, 'tcx> {
         // to ensure it is not incorporating implementation artifacts into
         // the hash that are not otherwise visible.)
 
-        let crate_disambiguator = self.sess.crate_disambiguator.get();
+        let crate_disambiguator = self.sess.local_crate_disambiguator();
         let krate = self.map.krate();
 
         // FIXME: this should use SHA1, not SipHash. SipHash is not built to
@@ -47,10 +47,10 @@ impl<'a, 'tcx> SvhCalculate for TyCtxt<'a, 'tcx, 'tcx> {
         // FIXME(#32753) -- at (*) we `to_le` for endianness, but is
         // this enough, and does it matter anyway?
         "crate_disambiguator".hash(&mut state);
-        crate_disambiguator.as_str().len().to_le().hash(&mut state); // (*)
-        crate_disambiguator.as_str().hash(&mut state);
+        crate_disambiguator.len().to_le().hash(&mut state); // (*)
+        crate_disambiguator.hash(&mut state);
 
-        debug!("crate_disambiguator: {:?}", crate_disambiguator.as_str());
+        debug!("crate_disambiguator: {:?}", crate_disambiguator);
         debug!("state: {:?}", state);
 
         {