2021-06-29 20:33:31 +02:00
|
|
|
#![allow(non_fmt_panics)]
|
2018-08-26 15:19:34 +02:00
|
|
|
#![crate_type = "lib"]
|
2018-08-13 13:48:47 +02:00
|
|
|
|
2020-10-18 15:02:42 +02:00
|
|
|
const MSG: &str = "hello";
|
|
|
|
|
2020-10-18 14:34:30 +02:00
|
|
|
const Z: () = std::panic!("cheese");
|
2021-06-15 19:16:10 -04:00
|
|
|
//~^ ERROR evaluation of constant value failed
|
2018-08-13 13:48:47 +02:00
|
|
|
|
2020-10-18 14:34:30 +02:00
|
|
|
const Z2: () = std::panic!();
|
2021-06-15 19:16:10 -04:00
|
|
|
//~^ ERROR evaluation of constant value failed
|
2018-08-13 13:48:47 +02:00
|
|
|
|
2020-10-18 14:34:30 +02:00
|
|
|
const Y: () = std::unreachable!();
|
2021-06-15 19:16:10 -04:00
|
|
|
//~^ ERROR evaluation of constant value failed
|
2020-10-18 14:34:30 +02:00
|
|
|
|
|
|
|
const X: () = std::unimplemented!();
|
2021-06-15 19:16:10 -04:00
|
|
|
//~^ ERROR evaluation of constant value failed
|
2021-09-14 19:14:37 +01:00
|
|
|
|
2020-10-18 15:02:42 +02:00
|
|
|
const W: () = std::panic!(MSG);
|
2021-06-15 19:16:10 -04:00
|
|
|
//~^ ERROR evaluation of constant value failed
|
2020-10-18 14:34:30 +02:00
|
|
|
|
2021-09-14 19:14:37 +01:00
|
|
|
const W2: () = std::panic!("{}", MSG);
|
|
|
|
//~^ ERROR evaluation of constant value failed
|
|
|
|
|
2020-10-18 14:34:30 +02:00
|
|
|
const Z_CORE: () = core::panic!("cheese");
|
2021-06-15 19:16:10 -04:00
|
|
|
//~^ ERROR evaluation of constant value failed
|
2020-10-18 14:34:30 +02:00
|
|
|
|
|
|
|
const Z2_CORE: () = core::panic!();
|
2021-06-15 19:16:10 -04:00
|
|
|
//~^ ERROR evaluation of constant value failed
|
2020-10-18 14:34:30 +02:00
|
|
|
|
|
|
|
const Y_CORE: () = core::unreachable!();
|
2021-06-15 19:16:10 -04:00
|
|
|
//~^ ERROR evaluation of constant value failed
|
2020-10-18 14:34:30 +02:00
|
|
|
|
|
|
|
const X_CORE: () = core::unimplemented!();
|
2021-06-15 19:16:10 -04:00
|
|
|
//~^ ERROR evaluation of constant value failed
|
2020-10-18 15:02:42 +02:00
|
|
|
|
|
|
|
const W_CORE: () = core::panic!(MSG);
|
2021-06-15 19:16:10 -04:00
|
|
|
//~^ ERROR evaluation of constant value failed
|
2021-09-14 19:14:37 +01:00
|
|
|
|
|
|
|
const W2_CORE: () = core::panic!("{}", MSG);
|
|
|
|
//~^ ERROR evaluation of constant value failed
|