blob: 3d8b77bcf7b47d4444e0d1c5069c451cbd4c9a69 (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
// run-pass
#![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 {
X
}
fn main() {
assert_eq!(const_u32_identity::<18>(), 18);
}
|