mirror of
https://github.com/rust-lang/rust
synced 2024-11-05 20:45:15 +00:00
14 lines
248 B
Rust
14 lines
248 B
Rust
//@ 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;
|
|
}
|