Path remapping: Make behavior of diagnostics output dependent on presence of --remap-path-prefix.
This commit is contained in:
parent
dfd6306d26
commit
af1b65cb18
13 changed files with 65 additions and 41 deletions
|
@ -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();
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue