]> git.lizzy.rs Git - rust.git/blob - tests/ui/print_type_sizes/variants.rs
Rollup merge of #103236 - tspiteri:redoc-int-adc-sbb, r=m-ou-se
[rust.git] / tests / ui / print_type_sizes / variants.rs
1 // compile-flags: -Z print-type-sizes --crate-type=lib
2 // build-pass
3
4 // This file illustrates two things:
5 //
6 // 1. Only types that appear in a monomorphized function appear in the
7 //    print-type-sizes output, and
8 //
9 // 2. For an enum, the print-type-sizes output will also include the
10 //    size of each variant.
11
12 pub struct SevenBytes([u8;  7]);
13 pub struct FiftyBytes([u8; 50]);
14
15 pub enum Enum {
16     Small(SevenBytes),
17     Large(FiftyBytes),
18 }