about summary refs log tree commit diff
path: root/tests/ui/intrinsics/const-eval-select-stability.rs
blob: 25cbadaa22dd8197c296eca443628caf5e003e6c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#![feature(staged_api)]
#![feature(const_eval_select)]
#![feature(core_intrinsics)]
#![stable(since = "1.0", feature = "ui_test")]

use std::intrinsics::const_eval_select;

fn log() {
    println!("HEY HEY HEY")
}

const fn nothing(){}

#[stable(since = "1.0", feature = "hey")]
#[rustc_const_stable(since = "1.0", feature = "const_hey")]
pub const fn hey() {
    const_eval_select((), nothing, log);
    //~^ ERROR cannot use `#[feature(const_eval_select)]`
}

fn main() {}