From 3a6c6ee3d3a3ea3ddc60f450704c2f9d2421bc3c Mon Sep 17 00:00:00 2001 From: Urgau Date: Sat, 28 Sep 2024 21:50:23 +0200 Subject: [PATCH] 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) --- tests/ui/errors/remap-path-prefix-sysroot.rs | 1 + tests/ui/errors/remap-path-prefix-sysroot.with-remap.stderr | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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