1 // Tests that the compiler does not ICE when const-evaluating a `panic!()` invocation with a
2 // non-`&str` argument.
4 const _: () = panic!(1);
5 //~^ ERROR: argument to `panic!()` in a const context must have type `&str`
7 static _FOO: () = panic!(true);
8 //~^ ERROR: argument to `panic!()` in a const context must have type `&str`
12 //~^ ERROR: argument to `panic!()` in a const context must have type `&str`
15 // ensure that conforming panics don't cause an error
16 const _: () = panic!();
17 static _BAR: () = panic!("panic in static");
20 panic!("panic in const fn");