Skip to content

Commit

Permalink
Rollup merge of #98491 - antoyo:fix/ui-test-backtrace-panic-abort, r=…
Browse files Browse the repository at this point in the history
…Dylan-DPC

Fix backtrace UI test when panic=abort is used

The function `contains_verbose_expected` is only used when the panic strategy is not abort, so it caused a warning when it was abort, which made the UI test failed on stderr comparison.
  • Loading branch information
JohnTitor authored Jun 26, 2022
2 parents d0828a3 + 50a46b9 commit b1d66d8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/test/ui/backtrace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ fn expected(fn_name: &str) -> String {
format!(" backtrace::{}", fn_name)
}

#[cfg(not(panic = "abort"))]
fn contains_verbose_expected(s: &str, fn_name: &str) -> bool {
// HACK(eddyb) work around the fact that verbosely demangled stack traces
// (from `RUST_BACKTRACE=full`, or, as is the case here, panic-in-panic)
Expand Down

0 comments on commit b1d66d8

Please sign in to comment.