diff options
Diffstat (limited to 'src/test/ui/intrinsics/const-eval-select.rs')
-rw-r--r-- | src/test/ui/intrinsics/const-eval-select.rs | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/src/test/ui/intrinsics/const-eval-select.rs b/src/test/ui/intrinsics/const-eval-select.rs deleted file mode 100644 index 9ff20d3fb..000000000 --- a/src/test/ui/intrinsics/const-eval-select.rs +++ /dev/null @@ -1,27 +0,0 @@ -// run-pass - -#![feature(const_eval_select)] -#![feature(core_intrinsics)] - -use std::intrinsics::const_eval_select; - -const fn yes() -> bool { - true -} - -fn no() -> bool { - false -} - -// not a sound use case; testing only -const fn is_const_eval() -> bool { - unsafe { const_eval_select((), yes, no) } -} - -fn main() { - const YES: bool = is_const_eval(); - let no = is_const_eval(); - - assert_eq!(true, YES); - assert_eq!(false, no); -} |