From 5417b45c2676dcd396f007bd89ed0cd55d085768 Mon Sep 17 00:00:00 2001 From: Andy Wang Date: Mon, 19 Apr 2021 23:27:02 +0100 Subject: Use local and remapped paths where appropriate --- compiler/rustc_interface/src/passes.rs | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'compiler/rustc_interface/src') 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 { -- cgit 1.4.1-3-g733a5