]> git.lizzy.rs Git - rust.git/blob - src/test/ui/intrinsics/const-eval-select-stability.rs
Rollup merge of #102187 - b-naber:inline-const-source-info, r=eholk
[rust.git] / src / test / ui / intrinsics / const-eval-select-stability.rs
1 #![feature(staged_api)]
2 #![feature(const_eval_select)]
3 #![feature(core_intrinsics)]
4 #![stable(since = "1.0", feature = "ui_test")]
5
6 use std::intrinsics::const_eval_select;
7
8 fn log() {
9     println!("HEY HEY HEY")
10 }
11
12 const fn nothing(){}
13
14 #[stable(since = "1.0", feature = "hey")]
15 #[rustc_const_stable(since = "1.0", feature = "const_hey")]
16 pub const unsafe fn hey() {
17     const_eval_select((), nothing, log);
18     //~^ ERROR `const_eval_select` is not yet stable as a const fn
19 }
20
21 fn main() {}