From c296c89be601a57597a1c262b9e3a4c9b4d056cf Mon Sep 17 00:00:00 2001 From: Michael Woerister Date: Fri, 27 Aug 2021 12:43:07 +0200 Subject: [PATCH] Fix remap-path-prefix UI test case. --- src/test/ui/remap-path-prefix.rs | 6 +++++- src/test/ui/remap-path-prefix.stderr | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/test/ui/remap-path-prefix.rs b/src/test/ui/remap-path-prefix.rs index 66a397bc7dbef..2eef970997708 100644 --- a/src/test/ui/remap-path-prefix.rs +++ b/src/test/ui/remap-path-prefix.rs @@ -1,5 +1,9 @@ // compile-flags: --remap-path-prefix={{src-base}}=remapped fn main() { - ferris //~ ERROR cannot find value `ferris` in this scope + // We cannot actually put an ERROR marker here because + // the file name in the error message is not what the + // test framework expects (since the filename gets remapped). + // We still test the expected error in the stderr file. + ferris } diff --git a/src/test/ui/remap-path-prefix.stderr b/src/test/ui/remap-path-prefix.stderr index a20cf6b4df80e..ad6a35d1256cd 100644 --- a/src/test/ui/remap-path-prefix.stderr +++ b/src/test/ui/remap-path-prefix.stderr @@ -1,5 +1,5 @@ error[E0425]: cannot find value `ferris` in this scope - --> remapped/remap-path-prefix.rs:4:5 + --> remapped/remap-path-prefix.rs:8:5 | LL | ferris | ^^^^^^ not found in this scope