about summary refs log tree commit diff
path: root/compiler/rustc_metadata
diff options
context:
space:
mode:
authorAndy Wang <qian.wang19@imperial.ac.uk>2021-04-10 13:48:06 +0100
committerAndy Wang <cbeuw.andy@gmail.com>2021-05-05 15:10:57 +0100
commit04079190835c04e8c671daef492144dfe06564ab (patch)
treeeb1ae6913927e715446fdfd90a6d5de0062d8319 /compiler/rustc_metadata
parent9e0426d7842c4a603237789b59e6c491d2dd3b4a (diff)
downloadrust-04079190835c04e8c671daef492144dfe06564ab.tar.gz
rust-04079190835c04e8c671daef492144dfe06564ab.zip
Use RealFileName for Session::working_dir as it may also be remapped
Diffstat (limited to 'compiler/rustc_metadata')
-rw-r--r--compiler/rustc_metadata/src/rmeta/encoder.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_metadata/src/rmeta/encoder.rs b/compiler/rustc_metadata/src/rmeta/encoder.rs
index 9a398d902a7..9253f421cfe 100644
--- a/compiler/rustc_metadata/src/rmeta/encoder.rs
+++ b/compiler/rustc_metadata/src/rmeta/encoder.rs
@@ -469,7 +469,7 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> {
         let source_map = self.tcx.sess.source_map();
         let all_source_files = source_map.files();
 
-        let (working_dir, _cwd_remapped) = self.tcx.sess.working_dir.clone();
+        let working_dir = self.tcx.sess.working_dir.stable_name();
         // By replacing the `Option` with `None`, we ensure that we can't
         // accidentally serialize any more `Span`s after the source map encoding
         // is done.