]> git.lizzy.rs Git - rust.git/blob - src/test/ui/print_type_sizes/anonymous.rs
Merge commit '48d60ab7c505c6c1ebb042eacaafd8dc9f7a9267' into libgccjit-codegen
[rust.git] / src / test / ui / print_type_sizes / anonymous.rs
1 // compile-flags: -Z print-type-sizes
2 // build-pass
3
4 // All of the types that occur in this function are uninteresting, in
5 // that one cannot control the sizes of these types with the same sort
6 // of enum-variant manipulation tricks.
7
8 #![feature(start)]
9
10 #[start]
11 fn start(_: isize, _: *const *const u8) -> isize {
12     let _byte: u8 = 0;
13     let _word: usize = 0;
14     let _tuple: (u8, usize)= (0, 0);
15     let _array: [u8; 128] = [0; 128];
16     let _fn: fn (u8) -> u8 = id;
17     let _diverging: fn (u8) -> ! = bye;
18
19     fn id(x: u8) -> u8 { x };
20     fn bye(_: u8) -> ! { loop { } }
21
22     0
23 }