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