summaryrefslogtreecommitdiffstats
path: root/tests/ui/print_type_sizes/repr_int_c.rs
blob: 6b103776a30d3c6c700a85cf3a242f4661edc8ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// compile-flags: -Z print-type-sizes --crate-type=lib
// build-pass

// This test makes sure that the tag is not grown for `repr(C)` or `repr(u8)`
// variants (see https://github.com/rust-lang/rust/issues/50098 for the original bug).

#![allow(dead_code)]

#[repr(C, u8)]
enum ReprCu8 {
    A(u16),
    B,
}

#[repr(u8)]
enum Repru8 {
    A(u16),
    B,
}