about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLeón Orell Valerian Liehr <me@fmease.dev>2025-07-17 03:58:28 +0200
committerGitHub <noreply@github.com>2025-07-17 03:58:28 +0200
commit9ac88eabede895a3e8566cab70c77b07fcaa4356 (patch)
tree89874e5fbe7399a126072121e64e634935dbf2ee
parentfd2eb391d032181459773f3498c17b198513e0d0 (diff)
parentaa460dc24751c038a6598a8adff7914065025b93 (diff)
downloadrust-9ac88eabede895a3e8566cab70c77b07fcaa4356.tar.gz
rust-9ac88eabede895a3e8566cab70c77b07fcaa4356.zip
Rollup merge of #142304 - Enselic:panic-main-revisions, r=compiler-errors
tests: Add `RUST_BACKTRACE` and `-Cpanic` revisions to `panic-main.rs` test

This is a regression test for rust-lang/rust#123733 (**P-high** and **regression-from-stable-to-stable**) which was [fixed by accident without a regression test](https://github.com/rust-lang/rust/issues/123733#issuecomment-2929091266).

Edit 2025-06-23:

Closes https://github.com/rust-lang/rust/issues/123733
-rw-r--r--tests/ui/panics/panic-main.rs23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/ui/panics/panic-main.rs b/tests/ui/panics/panic-main.rs
index 3876dbb37c3..bf79de78a57 100644
--- a/tests/ui/panics/panic-main.rs
+++ b/tests/ui/panics/panic-main.rs
@@ -1,3 +1,26 @@
+//@ revisions: default abort-zero abort-one abort-full unwind-zero unwind-one unwind-full
+
+//@[abort-zero] compile-flags: -Cpanic=abort
+//@[abort-zero] no-prefer-dynamic
+//@[abort-zero] exec-env:RUST_BACKTRACE=0
+
+//@[abort-one] compile-flags: -Cpanic=abort
+//@[abort-one] no-prefer-dynamic
+//@[abort-one] exec-env:RUST_BACKTRACE=1
+
+//@[abort-full] compile-flags: -Cpanic=abort
+//@[abort-full] no-prefer-dynamic
+//@[abort-full] exec-env:RUST_BACKTRACE=full
+
+//@[unwind-zero] compile-flags: -Cpanic=unwind
+//@[unwind-zero] exec-env:RUST_BACKTRACE=0
+
+//@[unwind-one] compile-flags: -Cpanic=unwind
+//@[unwind-one] exec-env:RUST_BACKTRACE=1
+
+//@[unwind-full] compile-flags: -Cpanic=unwind
+//@[unwind-full] exec-env:RUST_BACKTRACE=full
+
 //@ run-fail
 //@ error-pattern:moop
 //@ needs-subprocess