diff --git a/src/test/ui/backtrace.rs b/src/test/ui/backtrace.rs index 05ccfcb5060..e2ac43fffc9 100644 --- a/src/test/ui/backtrace.rs +++ b/src/test/ui/backtrace.rs @@ -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)