Skip to content

Commit 6386fb9

Browse files
committed
[RFC 3127 - Trim Paths]: Fix building tools (rustdoc, clippy, ...)
1 parent afd7fe2 commit 6386fb9

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

src/librustdoc/html/sources.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,8 @@ impl SourceCollector<'_, '_> {
223223
cur.push(&fname);
224224

225225
let title = format!("{} - source", src_fname.to_string_lossy());
226-
let desc = format!("Source of the Rust file `{}`.", filename.prefer_remapped());
226+
let desc =
227+
format!("Source of the Rust file `{}`.", filename.prefer_remapped_unconditionaly());
227228
let page = layout::Page {
228229
title: &title,
229230
css_class: "src",

src/tools/clippy/clippy_lints/src/utils/internal_lints/metadata_collector.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ impl SerializableSpan {
494494
let loc: Loc = cx.sess().source_map().lookup_char_pos(span.lo());
495495

496496
Self {
497-
path: format!("{}", loc.file.name.prefer_remapped()),
497+
path: format!("{}", loc.file.name.prefer_remapped_unconditionaly()),
498498
line: loc.line,
499499
}
500500
}

src/tools/miri/src/shims/backtrace.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
135135
this.tcx.sess.source_map().lookup_char_pos(BytePos(offset.bytes().try_into().unwrap()));
136136

137137
let name = fn_instance.to_string();
138-
let filename = lo.file.name.prefer_remapped().to_string();
138+
let filename = lo.file.name.prefer_remapped_unconditionaly().to_string();
139139

140140
Ok((fn_instance, lo, name, filename))
141141
}

0 commit comments

Comments
 (0)