2020-08-04 22:18:20 +01:00
|
|
|
// Regression test for #47429: short backtraces were not terminating correctly
|
|
|
|
|
|
|
|
|
|
//@ compile-flags: -O
|
2022-06-15 16:36:19 +03:00
|
|
|
//@ compile-flags:-Cstrip=none
|
2020-08-04 22:18:20 +01:00
|
|
|
//@ run-fail
|
|
|
|
|
//@ check-run-results
|
|
|
|
|
//@ exec-env:RUST_BACKTRACE=1
|
|
|
|
|
|
2024-11-23 13:19:17 -05:00
|
|
|
// This is needed to avoid test output differences across std being built with v0 symbols vs legacy
|
|
|
|
|
// symbols.
|
2024-12-25 22:12:17 +11:00
|
|
|
//@ normalize-stderr: "begin_panic::<&str>" -> "begin_panic"
|
2024-12-26 15:47:26 +11:00
|
|
|
// This variant occurs on macOS with `rust.debuginfo-level = "line-tables-only"` (#133997)
|
2024-12-25 22:12:17 +11:00
|
|
|
//@ normalize-stderr: " begin_panic<&str>" -> " std::panicking::begin_panic"
|
2024-11-23 13:19:17 -05:00
|
|
|
// And this is for differences between std with and without debuginfo.
|
2024-12-25 22:12:17 +11:00
|
|
|
//@ normalize-stderr: "\n +at [^\n]+" -> ""
|
2024-11-23 13:19:17 -05:00
|
|
|
|
2020-08-04 22:18:20 +01:00
|
|
|
//@ ignore-msvc see #62897 and `backtrace-debuginfo.rs` test
|
|
|
|
|
//@ ignore-android FIXME #17520
|
|
|
|
|
//@ ignore-openbsd no support for libbacktrace without filename
|
2022-09-19 21:00:10 +00:00
|
|
|
//@ ignore-fuchsia Backtraces not symbolized
|
2025-01-23 16:36:54 +08:00
|
|
|
//@ needs-subprocess
|
2020-08-04 22:18:20 +01:00
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
|
panic!()
|
|
|
|
|
}
|