1
Fork 0

Replace RemapFileNameExt::for_codegen with explicit calls

This commit is contained in:
Urgau 2024-03-19 13:51:22 +01:00
parent 777c6b46cc
commit 106146fd95
9 changed files with 55 additions and 52 deletions

View file

@ -549,17 +549,11 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> {
match source_file.name {
FileName::Real(ref original_file_name) => {
let adapted_file_name = if self.tcx.sess.should_prefer_remapped_for_codegen() {
source_map.path_mapping().to_embeddable_absolute_path(
original_file_name.clone(),
working_directory,
)
} else {
source_map.path_mapping().to_local_embeddable_absolute_path(
original_file_name.clone(),
working_directory,
)
};
// FIXME: This should probably to conditionally remapped under
// a RemapPathScopeComponents but which one?
let adapted_file_name = source_map
.path_mapping()
.to_embeddable_absolute_path(original_file_name.clone(), working_directory);
adapted_source_file.name = FileName::Real(adapted_file_name);
}