about summary refs log tree commit diff
path: root/src/test/ui/const-generics/const-arg-in-fn.rs
blob: 43ed12efb895a101f56b0337a0a18449ebeb1d86 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// run-pass
// revisions: full min

#![cfg_attr(full, feature(const_generics))]
#![cfg_attr(full, allow(incomplete_features))]

fn const_u32_identity<const X: u32>() -> u32 {
    X
}

 fn main() {
    let val = const_u32_identity::<18>();
    assert_eq!(val, 18);
}