Sign in
android
/
toolchain
/
rustc
/
refs/heads/main
/
.
/
tests
/
ui
/
inline-const
/
const-expr-generic.rs
blob: e634e1d4a47f1beb36bcc2cde789960e02f65ce1 [
file
] [
log
] [
blame
]
//@ check-pass
#![
feature
(
inline_const
)]
fn
foo
<
T
>()
->
usize
{
const
{
std
::
mem
::
size_of
::<
T
>()
}
}
fn
bar
<
const
N
:
usize
>()
->
usize
{
const
{
N
+
1
}
}
fn
main
()
{
foo
::<
i32
>();
bar
::<
1
>();
}