Skip to content

Commit

Permalink
Unrolled build for rust-lang#131579
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#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 rust-lang#130996.
  • Loading branch information
rust-timer authored Oct 13, 2024
2 parents ef4e825 + 1fe079b commit fc3510a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tests/ui/meta/revision-bad.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit fc3510a

Please sign in to comment.