2020-08-10 13:50:58 -05:00
|
|
|
// Checks that `const fn` with const params can be used.
|
2020-04-13 15:32:40 -05:00
|
|
|
// run-pass
|
2019-02-05 10:54:23 -06:00
|
|
|
|
|
|
|
const fn const_u32_identity<const X: u32>() -> u32 {
|
|
|
|
X
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
2020-04-13 15:32:40 -05:00
|
|
|
assert_eq!(const_u32_identity::<18>(), 18);
|
2019-02-05 10:54:23 -06:00
|
|
|
}
|