mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 23:12:02 +00:00
14 lines
340 B
Rust
14 lines
340 B
Rust
//@ run-pass
|
|
fn main() {
|
|
// Check that the tail statement in the body unifies with something
|
|
for _ in 0..3 {
|
|
// `()` is fine to zero-initialize as it is zero sized and inhabited.
|
|
unsafe { std::mem::zeroed() }
|
|
}
|
|
|
|
// Check that the tail statement in the body can be unit
|
|
for _ in 0..3 {
|
|
()
|
|
}
|
|
}
|