3 #![feature(const_eval_select)]
5 use std::intrinsics::const_eval_select;
7 const fn yes() -> bool {
15 // not a sound use case; testing only
16 const fn is_const_eval() -> bool {
17 unsafe { const_eval_select((), yes, no) }
21 const YES: bool = is_const_eval();
22 let no = is_const_eval();
24 assert_eq!(true, YES);
25 assert_eq!(false, no);