1
Fork 0

Auto merge of #122450 - Urgau:simplify-trim-paths-feature, r=michaelwoerister

Simplify trim-paths feature by merging all debuginfo options together

This PR simplifies the trim-paths feature by merging all debuginfo options together, as described in https://github.com/rust-lang/rust/issues/111540#issuecomment-1994010274.

And also do some correctness fixes found during the review.

cc `@weihanglo`
r? `@michaelwoerister`
This commit is contained in:
bors 2024-03-29 14:00:21 +00:00
commit 685927aae6
18 changed files with 142 additions and 184 deletions

View file

@ -123,8 +123,11 @@ fn create_mappings<'tcx>(
let body_span = hir_info.body_span;
let source_file = source_map.lookup_source_file(body_span.lo());
use rustc_session::RemapFileNameExt;
let file_name = Symbol::intern(&source_file.name.for_codegen(tcx.sess).to_string_lossy());
use rustc_session::{config::RemapPathScopeComponents, RemapFileNameExt};
let file_name = Symbol::intern(
&source_file.name.for_scope(tcx.sess, RemapPathScopeComponents::MACRO).to_string_lossy(),
);
let term_for_bcb = |bcb| {
coverage_counters