2022-09-21 06:05:20 -05:00
|
|
|
//@ compile-flags: -Ztreat-err-as-bug=1
|
2020-08-19 05:05:32 -05:00
|
|
|
//@ failure-status: 101
|
2020-08-20 02:20:57 -05:00
|
|
|
//@ rustc-env:RUST_BACKTRACE=1
|
2023-02-07 13:17:24 -06:00
|
|
|
//@ normalize-stderr-test "\nerror: .*unexpectedly panicked.*\n\n" -> ""
|
2020-08-19 05:05:32 -05:00
|
|
|
//@ normalize-stderr-test "note: we would appreciate a bug report.*\n\n" -> ""
|
|
|
|
//@ normalize-stderr-test "note: compiler flags.*\n\n" -> ""
|
|
|
|
//@ normalize-stderr-test "note: rustc.*running on.*\n\n" -> ""
|
2023-06-20 12:16:18 -05:00
|
|
|
//@ normalize-stderr-test "thread.*panicked.*:\n.*\n" -> ""
|
2020-08-19 05:05:32 -05:00
|
|
|
//@ normalize-stderr-test "stack backtrace:\n" -> ""
|
2020-08-20 19:00:00 -05:00
|
|
|
//@ normalize-stderr-test "\s\d{1,}: .*\n" -> ""
|
|
|
|
//@ normalize-stderr-test "\s at .*\n" -> ""
|
2020-08-19 05:05:32 -05:00
|
|
|
//@ normalize-stderr-test ".*note: Some details.*\n" -> ""
|
2023-05-21 13:27:01 -05:00
|
|
|
//@ normalize-stderr-test ".*omitted \d{1,} frame.*\n" -> ""
|
2020-08-19 05:05:32 -05:00
|
|
|
#![allow(unconditional_panic)]
|
|
|
|
|
2022-09-21 06:05:20 -05:00
|
|
|
const X: i32 = 1 / 0; //~ERROR constant
|
2021-01-01 07:47:45 -06:00
|
|
|
|
2020-08-19 05:05:32 -05:00
|
|
|
fn main() {
|
2021-01-01 07:47:45 -06:00
|
|
|
let x: &'static i32 = &X;
|
2020-08-19 05:05:32 -05:00
|
|
|
println!("x={}", x);
|
|
|
|
}
|