blob: 5c1ee4e0d5a9eebbfe60df610111e630d2b41b29 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
// Checks that `const fn` with const params can be used.
// run-pass
// revisions: full min
#![cfg_attr(full, feature(const_generics))]
#![cfg_attr(full, allow(incomplete_features))]
const fn const_u32_identity<const X: u32>() -> u32 {
X
}
fn main() {
assert_eq!(const_u32_identity::<18>(), 18);
}
|