Skip to content

Commit b1d66d8

Browse files
authored
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.
2 parents d0828a3 + 50a46b9 commit b1d66d8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/test/ui/backtrace.rs

+1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ fn expected(fn_name: &str) -> String {
4444
format!(" backtrace::{}", fn_name)
4545
}
4646

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

0 commit comments

Comments
 (0)