Rollup merge of #98491 - antoyo:fix/ui-test-backtrace-panic-abort, r=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.
This commit is contained in:
Yuki Okushi 2022-06-26 13:15:00 +09:00 committed by GitHub
commit b1d66d810d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)