summary refs log tree commit diff
path: root/compiler/rustc_codegen_cranelift/src
diff options
context:
space:
mode:
authorMichael Woerister <michaelwoerister@posteo>2021-08-26 12:46:01 +0200
committerMichael Woerister <michaelwoerister@posteo>2021-08-27 11:50:44 +0200
commitaf1b65cb18d5fa1358d1ae7a8ed3b1f7c635b6b5 (patch)
treeafc0d0959aae2f267142807624136555545f4fd8 /compiler/rustc_codegen_cranelift/src
parentdfd6306d26af1a163aaaa1456b4594244ddd182f (diff)
downloadrust-af1b65cb18d5fa1358d1ae7a8ed3b1f7c635b6b5.tar.gz
rust-af1b65cb18d5fa1358d1ae7a8ed3b1f7c635b6b5.zip
Path remapping: Make behavior of diagnostics output dependent on presence of --remap-path-prefix.
Diffstat (limited to 'compiler/rustc_codegen_cranelift/src')
-rw-r--r--compiler/rustc_codegen_cranelift/src/debuginfo/mod.rs2
-rw-r--r--compiler/rustc_codegen_cranelift/src/lib.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_cranelift/src/debuginfo/mod.rs b/compiler/rustc_codegen_cranelift/src/debuginfo/mod.rs
index c471da83de2..14a593a71ce 100644
--- a/compiler/rustc_codegen_cranelift/src/debuginfo/mod.rs
+++ b/compiler/rustc_codegen_cranelift/src/debuginfo/mod.rs
@@ -66,7 +66,7 @@ impl<'tcx> DebugContext<'tcx> {
             rustc_interface::util::version_str().unwrap_or("unknown version"),
             cranelift_codegen::VERSION,
         );
-        let comp_dir = tcx.sess.opts.working_dir.to_string_lossy(false).into_owned();
+        let comp_dir = tcx.sess.opts.working_dir.to_string_lossy(FileNameDisplayPreference::Remapped).into_owned();
         let (name, file_info) = match tcx.sess.local_crate_source_file.clone() {
             Some(path) => {
                 let name = path.to_string_lossy().into_owned();
diff --git a/compiler/rustc_codegen_cranelift/src/lib.rs b/compiler/rustc_codegen_cranelift/src/lib.rs
index 4ef53663ca0..6c7c8cbc311 100644
--- a/compiler/rustc_codegen_cranelift/src/lib.rs
+++ b/compiler/rustc_codegen_cranelift/src/lib.rs
@@ -74,7 +74,7 @@ mod vtable;
 mod prelude {
     pub(crate) use std::convert::{TryFrom, TryInto};
 
-    pub(crate) use rustc_span::Span;
+    pub(crate) use rustc_span::{Span, FileNameDisplayPreference};
 
     pub(crate) use rustc_hir::def_id::{DefId, LOCAL_CRATE};
     pub(crate) use rustc_middle::bug;