Rollup merge of #131579 - jieyouxu:ui-panic-username, r=compiler-errors

Remap path prefix in the panic message of `tests/ui/meta/revision-bad.rs`

Otherwise `error-pattern` on the test run stderr can incorrectly match if the paths in panic backtrace has a matching substring (like if we look for `bar` in the error pattern, but the username is `baron`).

Tested locally by checking run output `./x test .\tests\ui\meta\revision-bad.rs -- -- --nocapture`:

```
--- stderr -------------------------------
thread 'main' panicked at remapped\meta\revision-bad.rs:14:5:
foo
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
------------------------------------------
```

Fixes #130996.
This commit is contained in:
Trevor Gross 2024-10-12 21:38:37 -05:00 committed by GitHub
commit 507dd637a3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -5,6 +5,7 @@
//@ revisions: foo bar //@ revisions: foo bar
//@ should-fail //@ should-fail
//@ needs-run-enabled //@ needs-run-enabled
//@ compile-flags: --remap-path-prefix={{src-base}}=remapped
//@[foo] error-pattern:bar //@[foo] error-pattern:bar
//@[bar] error-pattern:foo //@[bar] error-pattern:foo