1 // compile-flags: -Ztreat-err-as-bug=2
2 //~^ ERROR 1:1: 1:1: ty::ConstKind::Error constructed but no error reported
5 // rustc-env:RUST_BACKTRACE=1
6 // normalize-stderr-test "\nerror: internal compiler error.*\n\n" -> ""
7 // normalize-stderr-test "note:.*unexpectedly panicked.*\n\n" -> ""
8 // normalize-stderr-test "note: we would appreciate a bug report.*\n\n" -> ""
9 // normalize-stderr-test "note: compiler flags.*\n\n" -> ""
10 // normalize-stderr-test "note: rustc.*running on.*\n\n" -> ""
11 // normalize-stderr-test "thread.*panicked.*\n" -> ""
12 // normalize-stderr-test "stack backtrace:\n" -> ""
13 // normalize-stderr-test "\s\d{1,}: .*\n" -> ""
14 // normalize-stderr-test "\s at .*\n" -> ""
15 // normalize-stderr-test ".*note: Some details.*\n" -> ""
17 #![allow(unconditional_panic)]
20 const X: i32 = 1 / 0; //~WARN any use of this value will cause an error
21 //~| WARN this was previously accepted by the compiler but is being phased out
24 let x: &'static i32 = &X;
25 //~^ ERROR evaluation of constant value failed