]> git.lizzy.rs Git - rust.git/blob - tests/ui/print_type_sizes/uninhabited.rs
Rollup merge of #107576 - P1n3appl3:master, r=tmandry
[rust.git] / tests / ui / print_type_sizes / uninhabited.rs
1 // compile-flags: -Z print-type-sizes --crate-type=lib
2 // build-pass
3 // ignore-pass
4 // ^-- needed because `--pass check` does not emit the output needed.
5 //     FIXME: consider using an attribute instead of side-effects.
6
7 #![feature(never_type)]
8
9 pub fn test() {
10     let _x: Option<!> = None;
11     let _y: Result<u32, !> = Ok(42);
12     let _z: Result<!, !> = loop {};
13 }