]> git.proxmox.com Git - rustc.git/blob - src/test/ui/const-generics/const-fn-with-const-param.rs
New upstream version 1.44.1+dfsg1
[rustc.git] / src / test / ui / const-generics / const-fn-with-const-param.rs
1 // run-pass
2 #![feature(const_generics)]
3 //~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash
4
5 const fn const_u32_identity<const X: u32>() -> u32 {
6 X
7 }
8
9 fn main() {
10 assert_eq!(const_u32_identity::<18>(), 18);
11 }