about summary refs log tree commit diff
path: root/compiler/rustc_metadata/src
diff options
context:
space:
mode:
authorDylan DPC <99973273+Dylan-DPC@users.noreply.github.com>2022-06-11 12:59:27 +0200
committerGitHub <noreply@github.com>2022-06-11 12:59:27 +0200
commitb7b5045364ab8835ca7642feb5cb931fc77d7f65 (patch)
treeee086f527f79720d59c05ed36781932db360a016 /compiler/rustc_metadata/src
parent11d8ae2c7151b0b83f9c39594fdb47d8fa4d6ef2 (diff)
parent410e2832e4037c786fbf037aae7b0907336f8809 (diff)
Rollup merge of #97789 - ferrocene:pa-fix-issue-71363-test, r=cjgillot
Fix #71363's test by adding `-Z translate-remapped-path-to-local-path=no`

The test relies on `library/std/src/error.rs` not corresponding to a local path, but remapping might still find the related local file of a remapped path. To fix the test, this PR adds a new `-Z` flag to disable finding the corresponding local path of a remapped path.
Diffstat (limited to 'compiler/rustc_metadata/src')
-rw-r--r--compiler/rustc_metadata/src/rmeta/decoder.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/rustc_metadata/src/rmeta/decoder.rs b/compiler/rustc_metadata/src/rmeta/decoder.rs
index 775ebb48402..07d7a75522e 100644
--- a/compiler/rustc_metadata/src/rmeta/decoder.rs
+++ b/compiler/rustc_metadata/src/rmeta/decoder.rs
@@ -1486,6 +1486,8 @@ impl<'a, 'tcx> CrateMetadataRef<'a> {
             .filter(|_| {
                 // Only spend time on further checks if we have what to translate *to*.
                 sess.opts.real_rust_source_base_dir.is_some()
+                    // Some tests need the translation to be always skipped.
+                    && sess.opts.debugging_opts.translate_remapped_path_to_local_path
             })
             .filter(|virtual_dir| {
                 // Don't translate away `/rustc/$hash` if we're still remapping to it,