mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-24 15:54:15 +00:00
173 lines
5.2 KiB
Plaintext
173 lines
5.2 KiB
Plaintext
error: layout_of(Aligned1) = Layout {
|
|
size: Size(8 bytes),
|
|
align: AbiAndPrefAlign {
|
|
abi: Align(8 bytes),
|
|
pref: $PREF_ALIGN,
|
|
},
|
|
abi: Aggregate {
|
|
sized: true,
|
|
},
|
|
fields: Arbitrary {
|
|
offsets: [
|
|
Size(0 bytes),
|
|
],
|
|
memory_index: [
|
|
0,
|
|
],
|
|
},
|
|
largest_niche: Some(
|
|
Niche {
|
|
offset: Size(0 bytes),
|
|
value: Int(
|
|
I8,
|
|
false,
|
|
),
|
|
valid_range: 0..=1,
|
|
},
|
|
),
|
|
variants: Multiple {
|
|
tag: Initialized {
|
|
value: Int(
|
|
I8,
|
|
false,
|
|
),
|
|
valid_range: 0..=1,
|
|
},
|
|
tag_encoding: Direct,
|
|
tag_field: 0,
|
|
variants: [
|
|
Layout {
|
|
size: Size(8 bytes),
|
|
align: AbiAndPrefAlign {
|
|
abi: Align(8 bytes),
|
|
pref: $PREF_ALIGN,
|
|
},
|
|
abi: Aggregate {
|
|
sized: true,
|
|
},
|
|
fields: Arbitrary {
|
|
offsets: [],
|
|
memory_index: [],
|
|
},
|
|
largest_niche: None,
|
|
variants: Single {
|
|
index: 0,
|
|
},
|
|
},
|
|
Layout {
|
|
size: Size(8 bytes),
|
|
align: AbiAndPrefAlign {
|
|
abi: Align(8 bytes),
|
|
pref: $PREF_ALIGN,
|
|
},
|
|
abi: Aggregate {
|
|
sized: true,
|
|
},
|
|
fields: Arbitrary {
|
|
offsets: [],
|
|
memory_index: [],
|
|
},
|
|
largest_niche: None,
|
|
variants: Single {
|
|
index: 1,
|
|
},
|
|
},
|
|
],
|
|
},
|
|
}
|
|
--> $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,
|
|
},
|
|
abi: Scalar(
|
|
Initialized {
|
|
value: Int(
|
|
I8,
|
|
false,
|
|
),
|
|
valid_range: 0..=1,
|
|
},
|
|
),
|
|
fields: Arbitrary {
|
|
offsets: [
|
|
Size(0 bytes),
|
|
],
|
|
memory_index: [
|
|
0,
|
|
],
|
|
},
|
|
largest_niche: Some(
|
|
Niche {
|
|
offset: Size(0 bytes),
|
|
value: Int(
|
|
I8,
|
|
false,
|
|
),
|
|
valid_range: 0..=1,
|
|
},
|
|
),
|
|
variants: Multiple {
|
|
tag: Initialized {
|
|
value: Int(
|
|
I8,
|
|
false,
|
|
),
|
|
valid_range: 0..=1,
|
|
},
|
|
tag_encoding: Direct,
|
|
tag_field: 0,
|
|
variants: [
|
|
Layout {
|
|
size: Size(1 bytes),
|
|
align: AbiAndPrefAlign {
|
|
abi: Align(1 bytes),
|
|
pref: $PREF_ALIGN,
|
|
},
|
|
abi: Aggregate {
|
|
sized: true,
|
|
},
|
|
fields: Arbitrary {
|
|
offsets: [],
|
|
memory_index: [],
|
|
},
|
|
largest_niche: None,
|
|
variants: Single {
|
|
index: 0,
|
|
},
|
|
},
|
|
Layout {
|
|
size: Size(1 bytes),
|
|
align: AbiAndPrefAlign {
|
|
abi: Align(1 bytes),
|
|
pref: $PREF_ALIGN,
|
|
},
|
|
abi: Aggregate {
|
|
sized: true,
|
|
},
|
|
fields: Arbitrary {
|
|
offsets: [],
|
|
memory_index: [],
|
|
},
|
|
largest_niche: None,
|
|
variants: Single {
|
|
index: 1,
|
|
},
|
|
},
|
|
],
|
|
},
|
|
}
|
|
--> $DIR/issue-96185-overaligned-enum.rs:16:1
|
|
|
|
|
LL | pub enum Aligned2 {
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
error: aborting due to 2 previous errors
|
|
|