]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/const-fn-with-const-param.rs
Merge commit '0cce3f643bfcbb92d5a1bb71858c9cbaff749d6b' into clippyup
[rust.git] / src / test / ui / const-generics / const-fn-with-const-param.rs
1 // Checks that `const fn` with const params can be used.
2 // run-pass
3 // revisions: full min
4
5 #![cfg_attr(full, feature(const_generics))]
6 #![cfg_attr(full, allow(incomplete_features))]
7
8 const fn const_u32_identity<const X: u32>() -> u32 {
9     X
10 }
11
12 fn main() {
13     assert_eq!(const_u32_identity::<18>(), 18);
14 }