rust/tests/ui/layout/issue-96185-overaligned-enum.stderr

173 lines
5.2 KiB
Plaintext
Raw Normal View History

2022-05-07 08:01:25 -05:00
error: layout_of(Aligned1) = Layout {
2022-07-30 20:39:15 -05:00
size: Size(8 bytes),
align: AbiAndPrefAlign {
abi: Align(8 bytes),
pref: $PREF_ALIGN,
},
abi: Aggregate {
sized: true,
},
2022-05-07 08:01:25 -05:00
fields: Arbitrary {
offsets: [
Size(0 bytes),
],
memory_index: [
0,
],
},
2022-07-30 20:39:15 -05:00
largest_niche: Some(
Niche {
offset: Size(0 bytes),
value: Int(
I8,
false,
),
valid_range: 0..=1,
},
),
2022-05-07 08:01:25 -05:00
variants: Multiple {
tag: Initialized {
value: Int(
I8,
false,
),
valid_range: 0..=1,
},
tag_encoding: Direct,
tag_field: 0,
variants: [
Layout {
2022-07-30 20:39:15 -05:00
size: Size(8 bytes),
align: AbiAndPrefAlign {
abi: Align(8 bytes),
pref: $PREF_ALIGN,
},
abi: Aggregate {
sized: true,
},
2022-05-07 08:01:25 -05:00
fields: Arbitrary {
offsets: [],
memory_index: [],
},
2022-07-30 20:39:15 -05:00
largest_niche: None,
2022-05-07 08:01:25 -05:00
variants: Single {
index: 0,
},
2022-07-30 20:39:15 -05:00
},
Layout {
size: Size(8 bytes),
2022-05-07 08:01:25 -05:00
align: AbiAndPrefAlign {
abi: Align(8 bytes),
pref: $PREF_ALIGN,
},
2022-07-30 20:39:15 -05:00
abi: Aggregate {
sized: true,
},
2022-05-07 08:01:25 -05:00
fields: Arbitrary {
offsets: [],
memory_index: [],
},
2022-07-30 20:39:15 -05:00
largest_niche: None,
2022-05-07 08:01:25 -05:00
variants: Single {
index: 1,
},
},
],
},
2022-07-30 20:39:15 -05:00
}
--> $DIR/issue-96185-overaligned-enum.rs:8:1
|
LL | pub enum Aligned1 {
| ^^^^^^^^^^^^^^^^^
error: layout_of(Aligned2) = Layout {
size: Size(1 bytes),
align: AbiAndPrefAlign {
abi: Align(1 bytes),
pref: $PREF_ALIGN,
2022-05-07 08:01:25 -05:00
},
2022-07-30 20:39:15 -05:00
abi: Scalar(
Initialized {
2022-05-07 08:01:25 -05:00
value: Int(
I8,
false,
),
valid_range: 0..=1,
},
),
fields: Arbitrary {
offsets: [
Size(0 bytes),
],
memory_index: [
0,
],
},
2022-07-30 20:39:15 -05:00
largest_niche: Some(
Niche {
offset: Size(0 bytes),
value: Int(
I8,
false,
),
valid_range: 0..=1,
},
),
2022-05-07 08:01:25 -05:00
variants: Multiple {
tag: Initialized {
value: Int(
I8,
false,
),
valid_range: 0..=1,
},
tag_encoding: Direct,
tag_field: 0,
variants: [
Layout {
2022-07-30 20:39:15 -05:00
size: Size(1 bytes),
align: AbiAndPrefAlign {
abi: Align(1 bytes),
pref: $PREF_ALIGN,
},
abi: Aggregate {
sized: true,
},
2022-05-07 08:01:25 -05:00
fields: Arbitrary {
offsets: [],
memory_index: [],
},
2022-07-30 20:39:15 -05:00
largest_niche: None,
2022-05-07 08:01:25 -05:00
variants: Single {
index: 0,
},
2022-07-30 20:39:15 -05:00
},
Layout {
size: Size(1 bytes),
2022-05-07 08:01:25 -05:00
align: AbiAndPrefAlign {
abi: Align(1 bytes),
pref: $PREF_ALIGN,
},
2022-07-30 20:39:15 -05:00
abi: Aggregate {
sized: true,
},
2022-05-07 08:01:25 -05:00
fields: Arbitrary {
offsets: [],
memory_index: [],
},
2022-07-30 20:39:15 -05:00
largest_niche: None,
2022-05-07 08:01:25 -05:00
variants: Single {
index: 1,
},
},
],
},
}
--> $DIR/issue-96185-overaligned-enum.rs:16:1
|
LL | pub enum Aligned2 {
| ^^^^^^^^^^^^^^^^^
error: aborting due to 2 previous errors