about summary refs log tree commit diff
path: root/compiler/rustc_interface/src
diff options
context:
space:
mode:
authorAndy Wang <cbeuw.andy@gmail.com>2021-04-19 23:27:02 +0100
committerAndy Wang <cbeuw.andy@gmail.com>2021-05-05 15:31:28 +0100
commit5417b45c2676dcd396f007bd89ed0cd55d085768 (patch)
tree25a9819f523855d604aa373edb93c850f817532f /compiler/rustc_interface/src
parentfb4f6439f62d4b940bdfab3f78771d76eacab379 (diff)
downloadrust-5417b45c2676dcd396f007bd89ed0cd55d085768.tar.gz
rust-5417b45c2676dcd396f007bd89ed0cd55d085768.zip
Use local and remapped paths where appropriate
Diffstat (limited to 'compiler/rustc_interface/src')
-rw-r--r--compiler/rustc_interface/src/passes.rs10
1 files changed, 1 insertions, 9 deletions
diff --git a/compiler/rustc_interface/src/passes.rs b/compiler/rustc_interface/src/passes.rs
index 1d3109c8a29..df141f2b7bf 100644
--- a/compiler/rustc_interface/src/passes.rs
+++ b/compiler/rustc_interface/src/passes.rs
@@ -36,7 +36,6 @@ use rustc_session::output::{filename_for_input, filename_for_metadata};
 use rustc_session::search_paths::PathKind;
 use rustc_session::Session;
 use rustc_span::symbol::{Ident, Symbol};
-use rustc_span::FileName;
 use rustc_trait_selection::traits;
 use rustc_typeck as typeck;
 use tracing::{info, warn};
@@ -575,14 +574,7 @@ fn write_out_deps(
             .iter()
             .filter(|fmap| fmap.is_real_file())
             .filter(|fmap| !fmap.is_imported())
-            .map(|fmap| {
-                escape_dep_filename(&match &fmap.name {
-                    FileName::Real(real) => {
-                        real.local_path().unwrap_or(real.stable_name()).display().to_string()
-                    }
-                    _ => fmap.name.to_string(),
-                })
-            })
+            .map(|fmap| escape_dep_filename(&fmap.name.prefer_local().to_string()))
             .collect();
 
         if let Some(ref backend) = sess.opts.debugging_opts.codegen_backend {