about summary refs log tree commit diff
path: root/tests/ui/type/unit-type-basic-usages.rs
blob: c3ee8067f591844c16713e4c647a747f1848e791 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//! Checks the basic usage of unit type

//@ run-pass

fn f(u: ()) {
    u
}

pub fn main() {
    let u1: () = ();
    let mut _u2: () = f(u1);
    _u2 = ();
    ()
}