summary refs log tree commit diff
path: root/src/test/run-pass/for-loop-while/for-loop-has-unit-body.rs
blob: 009c59f2fa43dfe96cfbd0bdf17159450b9cfb71 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// run-pass
fn main() {
    // Check that the tail statement in the body unifies with something
    for _ in 0..3 {
        unsafe { std::mem::uninitialized() }
    }

    // Check that the tail statement in the body can be unit
    for _ in 0..3 {
        ()
    }
}