2019-02-05 17:54:23 +01:00
|
|
|
#![feature(const_generics)]
|
|
|
|
|
//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash
|
|
|
|
|
|
|
|
|
|
const fn const_u32_identity<const X: u32>() -> u32 {
|
2020-02-11 08:19:21 +01:00
|
|
|
//~^ ERROR const parameters are not permitted in const functions
|
2019-02-05 17:54:23 +01:00
|
|
|
X
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
|
println!("{:?}", const_u32_identity::<18>());
|
|
|
|
|
}
|