[RFC 3127 - Trim Paths]: Fix building tools (rustdoc, clippy, ...)

This commit is contained in:
Urgau 2023-08-23 17:58:21 +02:00
parent eccc9e6628
commit dcde31ad1e
3 changed files with 4 additions and 3 deletions

View File

@ -225,7 +225,8 @@ fn emit_source(
cur.push(&fname); cur.push(&fname);
let title = format!("{} - source", src_fname.to_string_lossy()); let title = format!("{} - source", src_fname.to_string_lossy());
let desc = format!("Source of the Rust file `{}`.", filename.prefer_remapped()); let desc =
format!("Source of the Rust file `{}`.", filename.prefer_remapped_unconditionaly());
let page = layout::Page { let page = layout::Page {
title: &title, title: &title,
css_class: "src", css_class: "src",

View File

@ -494,7 +494,7 @@ fn from_span(cx: &LateContext<'_>, span: Span) -> Self {
let loc: Loc = cx.sess().source_map().lookup_char_pos(span.lo()); let loc: Loc = cx.sess().source_map().lookup_char_pos(span.lo());
Self { Self {
path: format!("{}", loc.file.name.prefer_remapped()), path: format!("{}", loc.file.name.prefer_remapped_unconditionaly()),
line: loc.line, line: loc.line,
} }
} }

View File

@ -135,7 +135,7 @@ fn resolve_frame_pointer(
this.tcx.sess.source_map().lookup_char_pos(BytePos(offset.bytes().try_into().unwrap())); this.tcx.sess.source_map().lookup_char_pos(BytePos(offset.bytes().try_into().unwrap()));
let name = fn_instance.to_string(); let name = fn_instance.to_string();
let filename = lo.file.name.prefer_remapped().to_string(); let filename = lo.file.name.prefer_remapped_unconditionaly().to_string();
Ok((fn_instance, lo, name, filename)) Ok((fn_instance, lo, name, filename))
} }