Skip to content

Commit 7753eda

Browse files
Path remapping: Make behavior of diagnostics output dependent on presence of --remap-path-prefix.
1 parent e0ea466 commit 7753eda

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/debuginfo/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ impl<'tcx> DebugContext<'tcx> {
6666
rustc_interface::util::version_str().unwrap_or("unknown version"),
6767
cranelift_codegen::VERSION,
6868
);
69-
let comp_dir = tcx.sess.opts.working_dir.to_string_lossy(false).into_owned();
69+
let comp_dir = tcx.sess.opts.working_dir.to_string_lossy(FileNameDisplayPreference::Remapped).into_owned();
7070
let (name, file_info) = match tcx.sess.local_crate_source_file.clone() {
7171
Some(path) => {
7272
let name = path.to_string_lossy().into_owned();

src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ mod vtable;
7474
mod prelude {
7575
pub(crate) use std::convert::{TryFrom, TryInto};
7676

77-
pub(crate) use rustc_span::Span;
77+
pub(crate) use rustc_span::{Span, FileNameDisplayPreference};
7878

7979
pub(crate) use rustc_hir::def_id::{DefId, LOCAL_CRATE};
8080
pub(crate) use rustc_middle::bug;

0 commit comments

Comments
 (0)