Sign in
android
/
toolchain
/
rustc
/
refs/heads/main
/
.
/
tests
/
ui
/
consts
/
const-fn-zst-args.rs
blob: 27ee42460d2e5f0dc14223c8d2f480d29dbaa28f [
file
] [
log
] [
blame
] [
edit
]
//@ build-pass
// Check that the evaluation of const-functions with
// zero-sized types as arguments compiles successfully
struct
Zst
{}
const
fn
foo
(
val
:
Zst
)
->
Zst
{
val
}
const
FOO
:
Zst
=
foo
(
Zst
{});
fn
main
()
{
const
_
:
Zst
=
FOO
;
}