summaryrefslogtreecommitdiffstats
path: root/src/test/ui/print_type_sizes/repr_int_c.rs
blob: b8067c112eef13c974e2d8f12afeba90feb80c40 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// compile-flags: -Z print-type-sizes
// 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).

#![feature(start)]
#![allow(dead_code)]

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

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

#[start]
fn start(_: isize, _: *const *const u8) -> isize {
    0
}