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