summary refs log tree commit diff
path: root/src/test/ui/const-generics/const-fn-with-const-param.rs
blob: e9e236be556300d819da13aebee6fe28276f3619 (plain)
1
2
3
4
5
6
7
8
9
10
11
#![feature(const_generics)]
//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash

const fn const_u32_identity<const X: u32>() -> u32 {
    //~^ ERROR const parameters are not permitted in const functions
    X
}

fn main() {
    println!("{:?}", const_u32_identity::<18>());
}