]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_codegen_cranelift/src/common.rs
Use local and remapped paths where appropriate
[rust.git] / compiler / rustc_codegen_cranelift / src / common.rs
index 92e4435565ee7575d0e77e8756f1f8040b7de0ce..c12d6d0f1414306a13c698059eb544493129766a 100644 (file)
@@ -334,7 +334,9 @@ pub(crate) fn get_caller_location(&mut self, span: Span) -> CValue<'tcx> {
         let topmost = span.ctxt().outer_expn().expansion_cause().unwrap_or(span);
         let caller = self.tcx.sess.source_map().lookup_char_pos(topmost.lo());
         let const_loc = self.tcx.const_caller_location((
-            rustc_span::symbol::Symbol::intern(&caller.file.name.to_string()),
+            rustc_span::symbol::Symbol::intern(
+                &caller.file.name.prefer_remapped().to_string_lossy(),
+            ),
             caller.line as u32,
             caller.col_display as u32 + 1,
         ));