summary refs log tree commit diff
path: root/src/test/ui/internal/internal-unstable-const.rs
blob: ce306c845175af061075edcc003316362fb70775 (plain)
1
2
3
4
5
6
7
8
9
10
#![feature(staged_api)]
#![feature(const_if_match)]

#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_stable(feature = "rust1", since = "1.0.0")]
const fn foo() -> i32 {
    if true { 4 } else { 5 } //~ loops and conditional expressions are not stable in const fn
}

fn main() {}