about summary refs log tree commit diff
path: root/compiler/rustc_metadata/src
diff options
context:
space:
mode:
authorPietro Albini <pietro.albini@ferrous-systems.com>2022-06-06 11:54:01 +0200
committerPietro Albini <pietro.albini@ferrous-systems.com>2022-06-06 11:54:01 +0200
commit410e2832e4037c786fbf037aae7b0907336f8809 (patch)
tree331d6ea4b0fc9dfe58f905a012318156a4544c6b /compiler/rustc_metadata/src
parent6609c6734de4df43e24d7672f8ae8786ecc8047e (diff)
downloadrust-410e2832e4037c786fbf037aae7b0907336f8809.tar.gz
rust-410e2832e4037c786fbf037aae7b0907336f8809.zip
fix #71363 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 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,