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
matthiaskrgr authored Jun 25, 2022
2 parents 0c0e4c8 + 50a46b9 commit 2761d5f
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 @@ -43,6 +43,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 2761d5f

Please sign in to comment.