rust/tests/ui/consts/const-eval/const-eval-query-stack.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

22 lines
764 B
Rust
Raw Normal View History

2022-09-21 11:05:20 +00:00
// compile-flags: -Ztreat-err-as-bug=1
2020-08-19 10:05:32 +00:00
// failure-status: 101
2020-08-20 07:20:57 +00:00
// rustc-env:RUST_BACKTRACE=1
// normalize-stderr-test "\nerror: .*unexpectedly panicked.*\n\n" -> ""
2020-08-19 10:05:32 +00: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" -> ""
// normalize-stderr-test "thread.*panicked.*\n" -> ""
// normalize-stderr-test "stack backtrace:\n" -> ""
// normalize-stderr-test "\s\d{1,}: .*\n" -> ""
// normalize-stderr-test "\s at .*\n" -> ""
2020-08-19 10:05:32 +00:00
// normalize-stderr-test ".*note: Some details.*\n" -> ""
#![allow(unconditional_panic)]
2022-09-21 11:05:20 +00:00
const X: i32 = 1 / 0; //~ERROR constant
2020-08-19 10:05:32 +00:00
fn main() {
let x: &'static i32 = &X;
2020-08-19 10:05:32 +00:00
println!("x={}", x);
}