Sign in
android
/
toolchain
/
rustc
/
refs/heads/main
/
.
/
tests
/
ui
/
const-generics
/
const-fn-with-const-param.rs
blob: 86a56c1e9e769b7f8e65948372d9ab5ccc71a5ec [
file
] [
log
] [
blame
] [
edit
]
// Checks that `const fn` with const params can be used.
//@ run-pass
const
fn
const_u32_identity
<
const
X
:
u32
>()
->
u32
{
X
}
fn
main
()
{
assert_eq
!(
const_u32_identity
::<
18
>(),
18
);
}