summaryrefslogtreecommitdiffstats
path: root/src/test/ui/print_type_sizes/uninhabited.rs
blob: 06a62db4ebb0f37014d835f0e71fc2f2fe85ad25 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// compile-flags: -Z print-type-sizes
// build-pass
// ignore-pass
// ^-- needed because `--pass check` does not emit the output needed.
//     FIXME: consider using an attribute instead of side-effects.

#![feature(never_type)]
#![feature(start)]

#[start]
fn start(_: isize, _: *const *const u8) -> isize {
    let _x: Option<!> = None;
    let _y: Result<u32, !> = Ok(42);
    let _z: Result<!, !> = loop {};
}