Skip to content

Commit 49ce89c

Browse files
committed
[RFC 3127 - Trim Paths]: Fix building tools (rustdoc, clippy, ...)
1 parent 9750e6d commit 49ce89c

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

src/librustdoc/html/sources.rs

+2-1
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

+1-1
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ impl SerializableSpan {
511511
let loc: Loc = cx.sess().source_map().lookup_char_pos(span.lo());
512512

513513
Self {
514-
path: format!("{}", loc.file.name.prefer_remapped()),
514+
path: format!("{}", loc.file.name.prefer_remapped_unconditionaly()),
515515
line: loc.line,
516516
}
517517
}

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
138138
this.tcx.sess.source_map().lookup_char_pos(BytePos(offset.bytes().try_into().unwrap()));
139139

140140
let name = fn_instance.to_string();
141-
let filename = lo.file.name.prefer_remapped().to_string();
141+
let filename = lo.file.name.prefer_remapped_unconditionaly().to_string();
142142

143143
Ok((fn_instance, lo, name, filename))
144144
}

0 commit comments

Comments
 (0)