From 1fe079bd62e68d94d5eff51cea94014a7e3c4625 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E6=9D=B0=E5=8F=8B=20Jieyou=20Xu=20=28Joe=29?= <39484203+jieyouxu@users.noreply.github.com> Date: Sat, 12 Oct 2024 09:41:42 +0800 Subject: [PATCH] Remap path refix in the panic message Otherwise `error-pattern` on the test run stderr can incorrectly match if e.g. the paths in panic backtrace has a matching substring (like if we look for `bar` in the error pattern but username is `baron`). --- tests/ui/meta/revision-bad.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/ui/meta/revision-bad.rs b/tests/ui/meta/revision-bad.rs index c5193b19d9e..0af5624ff9c 100644 --- a/tests/ui/meta/revision-bad.rs +++ b/tests/ui/meta/revision-bad.rs @@ -5,6 +5,7 @@ //@ revisions: foo bar //@ should-fail //@ needs-run-enabled +//@ compile-flags: --remap-path-prefix={{src-base}}=remapped //@[foo] error-pattern:bar //@[bar] error-pattern:foo