]> git.lizzy.rs Git - rust.git/blob - src/test/ui/layout/issue-96185-overaligned-enum.stderr
Rollup merge of #99415 - ferrocene:pa-reuse-initial, r=Mark-Simulacrum
[rust.git] / src / test / ui / layout / issue-96185-overaligned-enum.stderr
1 error: layout_of(Aligned1) = Layout {
2            size: Size(8 bytes),
3            align: AbiAndPrefAlign {
4                abi: Align(8 bytes),
5                pref: $PREF_ALIGN,
6            },
7            abi: Aggregate {
8                sized: true,
9            },
10            fields: Arbitrary {
11                offsets: [
12                    Size(0 bytes),
13                ],
14                memory_index: [
15                    0,
16                ],
17            },
18            largest_niche: Some(
19                Niche {
20                    offset: Size(0 bytes),
21                    value: Int(
22                        I8,
23                        false,
24                    ),
25                    valid_range: 0..=1,
26                },
27            ),
28            variants: Multiple {
29                tag: Initialized {
30                    value: Int(
31                        I8,
32                        false,
33                    ),
34                    valid_range: 0..=1,
35                },
36                tag_encoding: Direct,
37                tag_field: 0,
38                variants: [
39                    Layout {
40                        size: Size(8 bytes),
41                        align: AbiAndPrefAlign {
42                            abi: Align(8 bytes),
43                            pref: $PREF_ALIGN,
44                        },
45                        abi: Aggregate {
46                            sized: true,
47                        },
48                        fields: Arbitrary {
49                            offsets: [],
50                            memory_index: [],
51                        },
52                        largest_niche: None,
53                        variants: Single {
54                            index: 0,
55                        },
56                    },
57                    Layout {
58                        size: Size(8 bytes),
59                        align: AbiAndPrefAlign {
60                            abi: Align(8 bytes),
61                            pref: $PREF_ALIGN,
62                        },
63                        abi: Aggregate {
64                            sized: true,
65                        },
66                        fields: Arbitrary {
67                            offsets: [],
68                            memory_index: [],
69                        },
70                        largest_niche: None,
71                        variants: Single {
72                            index: 1,
73                        },
74                    },
75                ],
76            },
77        }
78   --> $DIR/issue-96185-overaligned-enum.rs:8:1
79    |
80 LL | pub enum Aligned1 {
81    | ^^^^^^^^^^^^^^^^^
82
83 error: layout_of(Aligned2) = Layout {
84            size: Size(1 bytes),
85            align: AbiAndPrefAlign {
86                abi: Align(1 bytes),
87                pref: $PREF_ALIGN,
88            },
89            abi: Scalar(
90                Initialized {
91                    value: Int(
92                        I8,
93                        false,
94                    ),
95                    valid_range: 0..=1,
96                },
97            ),
98            fields: Arbitrary {
99                offsets: [
100                    Size(0 bytes),
101                ],
102                memory_index: [
103                    0,
104                ],
105            },
106            largest_niche: Some(
107                Niche {
108                    offset: Size(0 bytes),
109                    value: Int(
110                        I8,
111                        false,
112                    ),
113                    valid_range: 0..=1,
114                },
115            ),
116            variants: Multiple {
117                tag: Initialized {
118                    value: Int(
119                        I8,
120                        false,
121                    ),
122                    valid_range: 0..=1,
123                },
124                tag_encoding: Direct,
125                tag_field: 0,
126                variants: [
127                    Layout {
128                        size: Size(1 bytes),
129                        align: AbiAndPrefAlign {
130                            abi: Align(1 bytes),
131                            pref: $PREF_ALIGN,
132                        },
133                        abi: Aggregate {
134                            sized: true,
135                        },
136                        fields: Arbitrary {
137                            offsets: [],
138                            memory_index: [],
139                        },
140                        largest_niche: None,
141                        variants: Single {
142                            index: 0,
143                        },
144                    },
145                    Layout {
146                        size: Size(1 bytes),
147                        align: AbiAndPrefAlign {
148                            abi: Align(1 bytes),
149                            pref: $PREF_ALIGN,
150                        },
151                        abi: Aggregate {
152                            sized: true,
153                        },
154                        fields: Arbitrary {
155                            offsets: [],
156                            memory_index: [],
157                        },
158                        largest_niche: None,
159                        variants: Single {
160                            index: 1,
161                        },
162                    },
163                ],
164            },
165        }
166   --> $DIR/issue-96185-overaligned-enum.rs:16:1
167    |
168 LL | pub enum Aligned2 {
169    | ^^^^^^^^^^^^^^^^^
170
171 error: aborting due to 2 previous errors
172