mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-14 17:48:10 +00:00
197 lines
6.1 KiB
Plaintext
197 lines
6.1 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,
|
|
},
|
|
max_repr_align: Some(
|
|
Align(8 bytes),
|
|
),
|
|
unadjusted_abi_align: Align(1 bytes),
|
|
},
|
|
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,
|
|
},
|
|
max_repr_align: Some(
|
|
Align(8 bytes),
|
|
),
|
|
unadjusted_abi_align: Align(1 bytes),
|
|
},
|
|
],
|
|
},
|
|
max_repr_align: Some(
|
|
Align(8 bytes),
|
|
),
|
|
unadjusted_abi_align: Align(1 bytes),
|
|
}
|
|
--> $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,
|
|
},
|
|
max_repr_align: Some(
|
|
Align(1 bytes),
|
|
),
|
|
unadjusted_abi_align: Align(1 bytes),
|
|
},
|
|
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,
|
|
},
|
|
max_repr_align: Some(
|
|
Align(1 bytes),
|
|
),
|
|
unadjusted_abi_align: Align(1 bytes),
|
|
},
|
|
],
|
|
},
|
|
max_repr_align: Some(
|
|
Align(1 bytes),
|
|
),
|
|
unadjusted_abi_align: Align(1 bytes),
|
|
}
|
|
--> $DIR/issue-96185-overaligned-enum.rs:16:1
|
|
|
|
|
LL | pub enum Aligned2 {
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
error: aborting due to 2 previous errors
|
|
|