about summary refs log tree commit diff
diff options
context:
space:
mode:
authorUrgau <urgau@numericable.fr>2024-09-28 21:50:23 +0200
committerUrgau <urgau@numericable.fr>2024-09-28 21:50:23 +0200
commit3a6c6ee3d3a3ea3ddc60f450704c2f9d2421bc3c (patch)
treec4a0ff073eaf7e94aa8354cc468967f3b28fa1c8
parent37ea27c741f3d04c23033b0c7ec343584b3e7502 (diff)
downloadrust-3a6c6ee3d3a3ea3ddc60f450704c2f9d2421bc3c.tar.gz
rust-3a6c6ee3d3a3ea3ddc60f450704c2f9d2421bc3c.zip
remap-path-prefix-sysroot: remap {{src-base}} as well
This is done to cover the path of the test it-self as it may not live
on the same root directory as {{rust-src-base}}, which can be the case
if {{rust-src-base}} is coming from a extracted dist build (cc opt-dist)
-rw-r--r--tests/ui/errors/remap-path-prefix-sysroot.rs1
-rw-r--r--tests/ui/errors/remap-path-prefix-sysroot.with-remap.stderr2
2 files changed, 2 insertions, 1 deletions
diff --git a/tests/ui/errors/remap-path-prefix-sysroot.rs b/tests/ui/errors/remap-path-prefix-sysroot.rs
index 66cafbf43b6..4cbb38709be 100644
--- a/tests/ui/errors/remap-path-prefix-sysroot.rs
+++ b/tests/ui/errors/remap-path-prefix-sysroot.rs
@@ -1,6 +1,7 @@
 //@ revisions: with-remap without-remap
 //@ compile-flags: -g -Ztranslate-remapped-path-to-local-path=yes
 //@ [with-remap]compile-flags: --remap-path-prefix={{rust-src-base}}=remapped
+//@ [with-remap]compile-flags: --remap-path-prefix={{src-base}}=remapped-tests-ui
 //@ [without-remap]compile-flags:
 //@ error-pattern: E0507
 
diff --git a/tests/ui/errors/remap-path-prefix-sysroot.with-remap.stderr b/tests/ui/errors/remap-path-prefix-sysroot.with-remap.stderr
index bdb882e2df5..88d713d2b04 100644
--- a/tests/ui/errors/remap-path-prefix-sysroot.with-remap.stderr
+++ b/tests/ui/errors/remap-path-prefix-sysroot.with-remap.stderr
@@ -1,5 +1,5 @@
 error[E0507]: cannot move out of `self.thread` which is behind a mutable reference
-  --> remapped/tests/ui/errors/remap-path-prefix-sysroot.rs:LL:COL
+  --> remapped-tests-ui/errors/remap-path-prefix-sysroot.rs:LL:COL
    |
 LL |         self.thread.join().unwrap();
    |         ^^^^^^^^^^^ ------ `self.thread` moved due to this method call