]> git.lizzy.rs Git - rust.git/blob - src/test/ui/print_type_sizes/no_duplicates.rs
add '// ignore-pass' where applicable.
[rust.git] / src / test / ui / print_type_sizes / no_duplicates.rs
1 // compile-flags: -Z print-type-sizes
2 // compile-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 // This file illustrates that when the same type occurs repeatedly
8 // (even if multiple functions), it is only printed once in the
9 // print-type-sizes output.
10
11 #![feature(start)]
12
13 pub struct SevenBytes([u8; 7]);
14
15 pub fn f1() {
16     let _s: SevenBytes = SevenBytes([0; 7]);
17 }
18
19 #[start]
20 fn start(_: isize, _: *const *const u8) -> isize {
21     let _s: SevenBytes = SevenBytes([0; 7]);
22     0
23 }