2022-04-18 20:28:53 -05:00
|
|
|
error: layout_of(MissingPayloadField) = Layout {
|
2022-07-30 20:39:15 -05:00
|
|
|
size: Size(2 bytes),
|
|
|
|
align: AbiAndPrefAlign {
|
|
|
|
abi: Align(1 bytes),
|
|
|
|
pref: $PREF_ALIGN,
|
|
|
|
},
|
|
|
|
abi: ScalarPair(
|
|
|
|
Initialized {
|
|
|
|
value: Int(
|
|
|
|
I8,
|
|
|
|
false,
|
|
|
|
),
|
|
|
|
valid_range: 0..=1,
|
|
|
|
},
|
|
|
|
Union {
|
|
|
|
value: Int(
|
|
|
|
I8,
|
|
|
|
false,
|
|
|
|
),
|
|
|
|
},
|
|
|
|
),
|
2022-04-18 20:28:53 -05:00
|
|
|
fields: Arbitrary {
|
|
|
|
offsets: [
|
2022-04-30 11:30:11 -05:00
|
|
|
Size(0 bytes),
|
2022-04-18 20:28:53 -05:00
|
|
|
],
|
|
|
|
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-04-18 20:28:53 -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(2 bytes),
|
|
|
|
align: AbiAndPrefAlign {
|
|
|
|
abi: Align(1 bytes),
|
|
|
|
pref: $PREF_ALIGN,
|
2022-04-18 20:28:53 -05:00
|
|
|
},
|
2022-05-09 10:29:59 -05:00
|
|
|
abi: ScalarPair(
|
|
|
|
Initialized {
|
|
|
|
value: Int(
|
|
|
|
I8,
|
|
|
|
false,
|
|
|
|
),
|
|
|
|
valid_range: 0..=1,
|
|
|
|
},
|
|
|
|
Union {
|
|
|
|
value: Int(
|
|
|
|
I8,
|
|
|
|
false,
|
|
|
|
),
|
|
|
|
},
|
|
|
|
),
|
2022-07-30 20:39:15 -05:00
|
|
|
fields: Arbitrary {
|
|
|
|
offsets: [
|
|
|
|
Size(1 bytes),
|
|
|
|
],
|
|
|
|
memory_index: [
|
|
|
|
0,
|
|
|
|
],
|
|
|
|
},
|
2022-04-18 20:28:53 -05:00
|
|
|
largest_niche: None,
|
2022-07-30 20:39:15 -05:00
|
|
|
variants: Single {
|
|
|
|
index: 0,
|
|
|
|
},
|
2023-07-14 16:48:13 -05:00
|
|
|
max_repr_align: None,
|
2023-06-14 21:39:11 -05:00
|
|
|
unadjusted_abi_align: Align(1 bytes),
|
2022-07-30 20:39:15 -05:00
|
|
|
},
|
|
|
|
Layout {
|
|
|
|
size: Size(1 bytes),
|
2022-04-18 20:28:53 -05:00
|
|
|
align: AbiAndPrefAlign {
|
2022-04-30 11:30:11 -05:00
|
|
|
abi: Align(1 bytes),
|
2022-04-22 00:46:24 -05:00
|
|
|
pref: $PREF_ALIGN,
|
2022-04-18 20:28:53 -05:00
|
|
|
},
|
2024-10-30 01:21:20 -05:00
|
|
|
abi: Memory {
|
2022-07-30 20:39:15 -05:00
|
|
|
sized: true,
|
|
|
|
},
|
2022-04-18 20:28:53 -05:00
|
|
|
fields: Arbitrary {
|
|
|
|
offsets: [],
|
|
|
|
memory_index: [],
|
|
|
|
},
|
2022-07-30 20:39:15 -05:00
|
|
|
largest_niche: None,
|
2022-04-18 20:28:53 -05:00
|
|
|
variants: Single {
|
|
|
|
index: 1,
|
|
|
|
},
|
2023-07-14 16:48:13 -05:00
|
|
|
max_repr_align: None,
|
2023-06-14 21:39:11 -05:00
|
|
|
unadjusted_abi_align: Align(1 bytes),
|
2022-04-18 20:28:53 -05:00
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
2023-07-14 16:48:13 -05:00
|
|
|
max_repr_align: None,
|
2023-06-14 21:39:11 -05:00
|
|
|
unadjusted_abi_align: Align(1 bytes),
|
2022-07-30 20:39:15 -05:00
|
|
|
}
|
|
|
|
--> $DIR/issue-96158-scalarpair-payload-might-be-uninit.rs:16:1
|
|
|
|
|
|
|
|
|
LL | pub enum MissingPayloadField {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: layout_of(CommonPayloadField) = Layout {
|
|
|
|
size: Size(2 bytes),
|
|
|
|
align: AbiAndPrefAlign {
|
|
|
|
abi: Align(1 bytes),
|
|
|
|
pref: $PREF_ALIGN,
|
|
|
|
},
|
2022-04-18 20:28:53 -05:00
|
|
|
abi: ScalarPair(
|
|
|
|
Initialized {
|
|
|
|
value: Int(
|
|
|
|
I8,
|
|
|
|
false,
|
|
|
|
),
|
|
|
|
valid_range: 0..=1,
|
|
|
|
},
|
2022-07-30 20:39:15 -05:00
|
|
|
Initialized {
|
2022-04-18 20:28:53 -05:00
|
|
|
value: Int(
|
|
|
|
I8,
|
|
|
|
false,
|
|
|
|
),
|
2022-07-30 20:39:15 -05:00
|
|
|
valid_range: 0..=255,
|
2022-04-18 20:28:53 -05:00
|
|
|
},
|
|
|
|
),
|
2022-07-30 20:39:15 -05:00
|
|
|
fields: Arbitrary {
|
|
|
|
offsets: [
|
|
|
|
Size(0 bytes),
|
|
|
|
],
|
|
|
|
memory_index: [
|
|
|
|
0,
|
|
|
|
],
|
|
|
|
},
|
2022-04-18 20:28:53 -05:00
|
|
|
largest_niche: Some(
|
|
|
|
Niche {
|
2022-04-30 11:30:11 -05:00
|
|
|
offset: Size(0 bytes),
|
2022-04-18 20:28:53 -05:00
|
|
|
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 {
|
2022-07-30 20:39:15 -05:00
|
|
|
size: Size(2 bytes),
|
|
|
|
align: AbiAndPrefAlign {
|
|
|
|
abi: Align(1 bytes),
|
|
|
|
pref: $PREF_ALIGN,
|
2022-04-18 20:28:53 -05:00
|
|
|
},
|
2022-05-09 10:29:59 -05:00
|
|
|
abi: ScalarPair(
|
|
|
|
Initialized {
|
|
|
|
value: Int(
|
|
|
|
I8,
|
|
|
|
false,
|
|
|
|
),
|
|
|
|
valid_range: 0..=1,
|
|
|
|
},
|
|
|
|
Initialized {
|
|
|
|
value: Int(
|
|
|
|
I8,
|
|
|
|
false,
|
|
|
|
),
|
|
|
|
valid_range: 0..=255,
|
|
|
|
},
|
|
|
|
),
|
2022-04-18 20:28:53 -05:00
|
|
|
fields: Arbitrary {
|
|
|
|
offsets: [
|
2022-04-30 11:30:11 -05:00
|
|
|
Size(1 bytes),
|
2022-04-18 20:28:53 -05:00
|
|
|
],
|
|
|
|
memory_index: [
|
|
|
|
0,
|
|
|
|
],
|
|
|
|
},
|
2022-07-30 20:39:15 -05:00
|
|
|
largest_niche: None,
|
2022-04-18 20:28:53 -05:00
|
|
|
variants: Single {
|
2022-07-30 20:39:15 -05:00
|
|
|
index: 0,
|
|
|
|
},
|
2023-07-14 16:48:13 -05:00
|
|
|
max_repr_align: None,
|
2023-06-14 21:39:11 -05:00
|
|
|
unadjusted_abi_align: Align(1 bytes),
|
2022-07-30 20:39:15 -05:00
|
|
|
},
|
|
|
|
Layout {
|
|
|
|
size: Size(2 bytes),
|
|
|
|
align: AbiAndPrefAlign {
|
|
|
|
abi: Align(1 bytes),
|
|
|
|
pref: $PREF_ALIGN,
|
2022-04-18 20:28:53 -05:00
|
|
|
},
|
2022-05-09 10:29:59 -05:00
|
|
|
abi: ScalarPair(
|
|
|
|
Initialized {
|
|
|
|
value: Int(
|
|
|
|
I8,
|
|
|
|
false,
|
|
|
|
),
|
|
|
|
valid_range: 0..=1,
|
|
|
|
},
|
|
|
|
Initialized {
|
|
|
|
value: Int(
|
|
|
|
I8,
|
|
|
|
false,
|
|
|
|
),
|
|
|
|
valid_range: 0..=255,
|
|
|
|
},
|
|
|
|
),
|
2022-07-30 20:39:15 -05:00
|
|
|
fields: Arbitrary {
|
|
|
|
offsets: [
|
|
|
|
Size(1 bytes),
|
|
|
|
],
|
|
|
|
memory_index: [
|
|
|
|
0,
|
|
|
|
],
|
|
|
|
},
|
2022-04-18 20:28:53 -05:00
|
|
|
largest_niche: None,
|
2022-07-30 20:39:15 -05:00
|
|
|
variants: Single {
|
|
|
|
index: 1,
|
2022-04-18 20:28:53 -05:00
|
|
|
},
|
2023-07-14 16:48:13 -05:00
|
|
|
max_repr_align: None,
|
2023-06-14 21:39:11 -05:00
|
|
|
unadjusted_abi_align: Align(1 bytes),
|
2022-04-18 20:28:53 -05:00
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
2023-07-14 16:48:13 -05:00
|
|
|
max_repr_align: None,
|
2023-06-14 21:39:11 -05:00
|
|
|
unadjusted_abi_align: Align(1 bytes),
|
2022-07-30 20:39:15 -05:00
|
|
|
}
|
|
|
|
--> $DIR/issue-96158-scalarpair-payload-might-be-uninit.rs:25:1
|
|
|
|
|
|
|
|
|
LL | pub enum CommonPayloadField {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: layout_of(CommonPayloadFieldIsMaybeUninit) = Layout {
|
|
|
|
size: Size(2 bytes),
|
|
|
|
align: AbiAndPrefAlign {
|
|
|
|
abi: Align(1 bytes),
|
|
|
|
pref: $PREF_ALIGN,
|
|
|
|
},
|
2022-04-18 20:28:53 -05:00
|
|
|
abi: ScalarPair(
|
|
|
|
Initialized {
|
|
|
|
value: Int(
|
|
|
|
I8,
|
|
|
|
false,
|
|
|
|
),
|
|
|
|
valid_range: 0..=1,
|
|
|
|
},
|
2022-07-30 20:39:15 -05:00
|
|
|
Union {
|
2022-04-18 20:28:53 -05:00
|
|
|
value: Int(
|
|
|
|
I8,
|
|
|
|
false,
|
|
|
|
),
|
|
|
|
},
|
|
|
|
),
|
2022-07-30 20:39:15 -05:00
|
|
|
fields: Arbitrary {
|
|
|
|
offsets: [
|
|
|
|
Size(0 bytes),
|
|
|
|
],
|
|
|
|
memory_index: [
|
|
|
|
0,
|
|
|
|
],
|
|
|
|
},
|
2022-04-18 20:28:53 -05:00
|
|
|
largest_niche: Some(
|
|
|
|
Niche {
|
2022-04-30 11:30:11 -05:00
|
|
|
offset: Size(0 bytes),
|
2022-04-18 20:28:53 -05:00
|
|
|
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 {
|
2022-07-30 20:39:15 -05:00
|
|
|
size: Size(2 bytes),
|
|
|
|
align: AbiAndPrefAlign {
|
|
|
|
abi: Align(1 bytes),
|
|
|
|
pref: $PREF_ALIGN,
|
2022-04-18 20:28:53 -05:00
|
|
|
},
|
2022-05-09 10:29:59 -05:00
|
|
|
abi: ScalarPair(
|
|
|
|
Initialized {
|
|
|
|
value: Int(
|
|
|
|
I8,
|
|
|
|
false,
|
|
|
|
),
|
|
|
|
valid_range: 0..=1,
|
|
|
|
},
|
|
|
|
Union {
|
|
|
|
value: Int(
|
|
|
|
I8,
|
|
|
|
false,
|
|
|
|
),
|
|
|
|
},
|
|
|
|
),
|
2022-04-18 20:28:53 -05:00
|
|
|
fields: Arbitrary {
|
|
|
|
offsets: [
|
2022-04-30 11:30:11 -05:00
|
|
|
Size(1 bytes),
|
2022-04-18 20:28:53 -05:00
|
|
|
],
|
|
|
|
memory_index: [
|
|
|
|
0,
|
|
|
|
],
|
|
|
|
},
|
2022-07-30 20:39:15 -05:00
|
|
|
largest_niche: None,
|
2022-04-18 20:28:53 -05:00
|
|
|
variants: Single {
|
2022-07-30 20:39:15 -05:00
|
|
|
index: 0,
|
|
|
|
},
|
2023-07-14 16:48:13 -05:00
|
|
|
max_repr_align: None,
|
2023-06-14 21:39:11 -05:00
|
|
|
unadjusted_abi_align: Align(1 bytes),
|
2022-07-30 20:39:15 -05:00
|
|
|
},
|
|
|
|
Layout {
|
|
|
|
size: Size(2 bytes),
|
|
|
|
align: AbiAndPrefAlign {
|
|
|
|
abi: Align(1 bytes),
|
|
|
|
pref: $PREF_ALIGN,
|
2022-04-18 20:28:53 -05:00
|
|
|
},
|
2022-05-09 10:29:59 -05:00
|
|
|
abi: ScalarPair(
|
|
|
|
Initialized {
|
|
|
|
value: Int(
|
|
|
|
I8,
|
|
|
|
false,
|
|
|
|
),
|
|
|
|
valid_range: 0..=1,
|
|
|
|
},
|
|
|
|
Union {
|
|
|
|
value: Int(
|
|
|
|
I8,
|
|
|
|
false,
|
|
|
|
),
|
|
|
|
},
|
|
|
|
),
|
2022-07-30 20:39:15 -05:00
|
|
|
fields: Arbitrary {
|
|
|
|
offsets: [
|
|
|
|
Size(1 bytes),
|
|
|
|
],
|
|
|
|
memory_index: [
|
|
|
|
0,
|
|
|
|
],
|
|
|
|
},
|
2022-04-18 20:28:53 -05:00
|
|
|
largest_niche: None,
|
2022-07-30 20:39:15 -05:00
|
|
|
variants: Single {
|
|
|
|
index: 1,
|
2022-04-18 20:28:53 -05:00
|
|
|
},
|
2023-07-14 16:48:13 -05:00
|
|
|
max_repr_align: None,
|
2023-06-14 21:39:11 -05:00
|
|
|
unadjusted_abi_align: Align(1 bytes),
|
2022-04-18 20:28:53 -05:00
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
2023-07-14 16:48:13 -05:00
|
|
|
max_repr_align: None,
|
2023-06-14 21:39:11 -05:00
|
|
|
unadjusted_abi_align: Align(1 bytes),
|
2022-07-30 20:39:15 -05:00
|
|
|
}
|
|
|
|
--> $DIR/issue-96158-scalarpair-payload-might-be-uninit.rs:33:1
|
|
|
|
|
|
|
|
|
LL | pub enum CommonPayloadFieldIsMaybeUninit {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: layout_of(NicheFirst) = Layout {
|
|
|
|
size: Size(2 bytes),
|
|
|
|
align: AbiAndPrefAlign {
|
|
|
|
abi: Align(1 bytes),
|
|
|
|
pref: $PREF_ALIGN,
|
|
|
|
},
|
2022-04-18 20:28:53 -05:00
|
|
|
abi: ScalarPair(
|
2023-02-15 18:49:00 -06:00
|
|
|
Initialized {
|
2022-04-18 20:28:53 -05:00
|
|
|
value: Int(
|
|
|
|
I8,
|
|
|
|
false,
|
|
|
|
),
|
2023-02-15 18:49:00 -06:00
|
|
|
valid_range: 0..=4,
|
2022-04-18 20:28:53 -05:00
|
|
|
},
|
2023-02-15 18:49:00 -06:00
|
|
|
Union {
|
2022-04-18 20:28:53 -05:00
|
|
|
value: Int(
|
|
|
|
I8,
|
|
|
|
false,
|
|
|
|
),
|
|
|
|
},
|
|
|
|
),
|
2022-07-30 20:39:15 -05:00
|
|
|
fields: Arbitrary {
|
|
|
|
offsets: [
|
2023-02-15 18:49:00 -06:00
|
|
|
Size(0 bytes),
|
2022-07-30 20:39:15 -05:00
|
|
|
],
|
|
|
|
memory_index: [
|
|
|
|
0,
|
|
|
|
],
|
|
|
|
},
|
2022-04-18 20:28:53 -05:00
|
|
|
largest_niche: Some(
|
|
|
|
Niche {
|
2023-02-15 18:49:00 -06:00
|
|
|
offset: Size(0 bytes),
|
2022-04-18 20:28:53 -05:00
|
|
|
value: Int(
|
|
|
|
I8,
|
|
|
|
false,
|
|
|
|
),
|
2022-07-30 20:39:15 -05:00
|
|
|
valid_range: 0..=4,
|
2022-04-18 20:28:53 -05:00
|
|
|
},
|
|
|
|
),
|
|
|
|
variants: Multiple {
|
|
|
|
tag: Initialized {
|
|
|
|
value: Int(
|
|
|
|
I8,
|
|
|
|
false,
|
|
|
|
),
|
|
|
|
valid_range: 0..=4,
|
|
|
|
},
|
|
|
|
tag_encoding: Niche {
|
2022-08-24 20:14:23 -05:00
|
|
|
untagged_variant: 0,
|
2022-04-18 20:28:53 -05:00
|
|
|
niche_variants: 1..=2,
|
|
|
|
niche_start: 3,
|
|
|
|
},
|
|
|
|
tag_field: 0,
|
|
|
|
variants: [
|
|
|
|
Layout {
|
2022-07-30 20:39:15 -05:00
|
|
|
size: Size(2 bytes),
|
|
|
|
align: AbiAndPrefAlign {
|
|
|
|
abi: Align(1 bytes),
|
|
|
|
pref: $PREF_ALIGN,
|
2022-04-18 20:28:53 -05:00
|
|
|
},
|
|
|
|
abi: ScalarPair(
|
|
|
|
Initialized {
|
|
|
|
value: Int(
|
|
|
|
I8,
|
|
|
|
false,
|
|
|
|
),
|
2023-02-15 18:49:00 -06:00
|
|
|
valid_range: 0..=2,
|
2022-04-18 20:28:53 -05:00
|
|
|
},
|
|
|
|
Initialized {
|
|
|
|
value: Int(
|
|
|
|
I8,
|
|
|
|
false,
|
|
|
|
),
|
2023-02-15 18:49:00 -06:00
|
|
|
valid_range: 0..=255,
|
2022-04-18 20:28:53 -05:00
|
|
|
},
|
|
|
|
),
|
2022-07-30 20:39:15 -05:00
|
|
|
fields: Arbitrary {
|
|
|
|
offsets: [
|
2022-10-06 18:10:15 -05:00
|
|
|
Size(0 bytes),
|
2023-02-15 18:49:00 -06:00
|
|
|
Size(1 bytes),
|
2022-07-30 20:39:15 -05:00
|
|
|
],
|
|
|
|
memory_index: [
|
2022-10-06 18:10:15 -05:00
|
|
|
0,
|
2023-02-15 18:49:00 -06:00
|
|
|
1,
|
2022-07-30 20:39:15 -05:00
|
|
|
],
|
|
|
|
},
|
2022-04-18 20:28:53 -05:00
|
|
|
largest_niche: Some(
|
|
|
|
Niche {
|
2023-02-15 18:49:00 -06:00
|
|
|
offset: Size(0 bytes),
|
2022-04-18 20:28:53 -05:00
|
|
|
value: Int(
|
|
|
|
I8,
|
|
|
|
false,
|
|
|
|
),
|
|
|
|
valid_range: 0..=2,
|
|
|
|
},
|
|
|
|
),
|
2022-07-30 20:39:15 -05:00
|
|
|
variants: Single {
|
|
|
|
index: 0,
|
|
|
|
},
|
2023-07-14 16:48:13 -05:00
|
|
|
max_repr_align: None,
|
2023-06-14 21:39:11 -05:00
|
|
|
unadjusted_abi_align: Align(1 bytes),
|
2022-07-30 20:39:15 -05:00
|
|
|
},
|
|
|
|
Layout {
|
|
|
|
size: Size(0 bytes),
|
2022-04-18 20:28:53 -05:00
|
|
|
align: AbiAndPrefAlign {
|
2022-04-30 11:30:11 -05:00
|
|
|
abi: Align(1 bytes),
|
2022-04-22 00:46:24 -05:00
|
|
|
pref: $PREF_ALIGN,
|
2022-04-18 20:28:53 -05:00
|
|
|
},
|
2024-10-30 01:21:20 -05:00
|
|
|
abi: Memory {
|
2022-07-30 20:39:15 -05:00
|
|
|
sized: true,
|
|
|
|
},
|
2022-04-18 20:28:53 -05:00
|
|
|
fields: Arbitrary {
|
|
|
|
offsets: [],
|
|
|
|
memory_index: [],
|
|
|
|
},
|
2022-07-30 20:39:15 -05:00
|
|
|
largest_niche: None,
|
2022-04-18 20:28:53 -05:00
|
|
|
variants: Single {
|
|
|
|
index: 1,
|
|
|
|
},
|
2023-07-14 16:48:13 -05:00
|
|
|
max_repr_align: None,
|
2023-06-14 21:39:11 -05:00
|
|
|
unadjusted_abi_align: Align(1 bytes),
|
2022-07-30 20:39:15 -05:00
|
|
|
},
|
|
|
|
Layout {
|
|
|
|
size: Size(0 bytes),
|
2022-04-18 20:28:53 -05:00
|
|
|
align: AbiAndPrefAlign {
|
2022-04-30 11:30:11 -05:00
|
|
|
abi: Align(1 bytes),
|
2022-04-22 00:46:24 -05:00
|
|
|
pref: $PREF_ALIGN,
|
2022-04-18 20:28:53 -05:00
|
|
|
},
|
2024-10-30 01:21:20 -05:00
|
|
|
abi: Memory {
|
2022-07-30 20:39:15 -05:00
|
|
|
sized: true,
|
|
|
|
},
|
2022-04-18 20:28:53 -05:00
|
|
|
fields: Arbitrary {
|
|
|
|
offsets: [],
|
|
|
|
memory_index: [],
|
|
|
|
},
|
2022-07-30 20:39:15 -05:00
|
|
|
largest_niche: None,
|
2022-04-18 20:28:53 -05:00
|
|
|
variants: Single {
|
|
|
|
index: 2,
|
|
|
|
},
|
2023-07-14 16:48:13 -05:00
|
|
|
max_repr_align: None,
|
2023-06-14 21:39:11 -05:00
|
|
|
unadjusted_abi_align: Align(1 bytes),
|
2022-04-18 20:28:53 -05:00
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
2023-07-14 16:48:13 -05:00
|
|
|
max_repr_align: None,
|
2023-06-14 21:39:11 -05:00
|
|
|
unadjusted_abi_align: Align(1 bytes),
|
2022-07-30 20:39:15 -05:00
|
|
|
}
|
|
|
|
--> $DIR/issue-96158-scalarpair-payload-might-be-uninit.rs:41:1
|
|
|
|
|
|
|
|
|
LL | pub enum NicheFirst {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: layout_of(NicheSecond) = Layout {
|
|
|
|
size: Size(2 bytes),
|
|
|
|
align: AbiAndPrefAlign {
|
|
|
|
abi: Align(1 bytes),
|
|
|
|
pref: $PREF_ALIGN,
|
|
|
|
},
|
2022-04-18 20:28:53 -05:00
|
|
|
abi: ScalarPair(
|
2023-02-15 18:49:00 -06:00
|
|
|
Initialized {
|
2022-04-18 20:28:53 -05:00
|
|
|
value: Int(
|
|
|
|
I8,
|
|
|
|
false,
|
|
|
|
),
|
2023-02-15 18:49:00 -06:00
|
|
|
valid_range: 0..=4,
|
2022-04-18 20:28:53 -05:00
|
|
|
},
|
2023-02-15 18:49:00 -06:00
|
|
|
Union {
|
2022-04-18 20:28:53 -05:00
|
|
|
value: Int(
|
|
|
|
I8,
|
|
|
|
false,
|
|
|
|
),
|
|
|
|
},
|
|
|
|
),
|
|
|
|
fields: Arbitrary {
|
|
|
|
offsets: [
|
2023-02-15 18:49:00 -06:00
|
|
|
Size(0 bytes),
|
2022-04-18 20:28:53 -05:00
|
|
|
],
|
|
|
|
memory_index: [
|
|
|
|
0,
|
|
|
|
],
|
|
|
|
},
|
2022-07-30 20:39:15 -05:00
|
|
|
largest_niche: Some(
|
|
|
|
Niche {
|
2023-02-15 18:49:00 -06:00
|
|
|
offset: Size(0 bytes),
|
2022-07-30 20:39:15 -05:00
|
|
|
value: Int(
|
|
|
|
I8,
|
|
|
|
false,
|
|
|
|
),
|
|
|
|
valid_range: 0..=4,
|
|
|
|
},
|
|
|
|
),
|
2022-04-18 20:28:53 -05:00
|
|
|
variants: Multiple {
|
|
|
|
tag: Initialized {
|
|
|
|
value: Int(
|
|
|
|
I8,
|
|
|
|
false,
|
|
|
|
),
|
|
|
|
valid_range: 0..=4,
|
|
|
|
},
|
|
|
|
tag_encoding: Niche {
|
2022-08-24 20:14:23 -05:00
|
|
|
untagged_variant: 0,
|
2022-04-18 20:28:53 -05:00
|
|
|
niche_variants: 1..=2,
|
|
|
|
niche_start: 3,
|
|
|
|
},
|
|
|
|
tag_field: 0,
|
|
|
|
variants: [
|
|
|
|
Layout {
|
2022-07-30 20:39:15 -05:00
|
|
|
size: Size(2 bytes),
|
|
|
|
align: AbiAndPrefAlign {
|
|
|
|
abi: Align(1 bytes),
|
|
|
|
pref: $PREF_ALIGN,
|
2022-04-18 20:28:53 -05:00
|
|
|
},
|
|
|
|
abi: ScalarPair(
|
|
|
|
Initialized {
|
|
|
|
value: Int(
|
|
|
|
I8,
|
|
|
|
false,
|
|
|
|
),
|
2023-02-15 18:49:00 -06:00
|
|
|
valid_range: 0..=2,
|
2022-04-18 20:28:53 -05:00
|
|
|
},
|
|
|
|
Initialized {
|
|
|
|
value: Int(
|
|
|
|
I8,
|
|
|
|
false,
|
|
|
|
),
|
2023-02-15 18:49:00 -06:00
|
|
|
valid_range: 0..=255,
|
2022-04-18 20:28:53 -05:00
|
|
|
},
|
|
|
|
),
|
2022-07-30 20:39:15 -05:00
|
|
|
fields: Arbitrary {
|
|
|
|
offsets: [
|
|
|
|
Size(1 bytes),
|
2023-02-15 18:49:00 -06:00
|
|
|
Size(0 bytes),
|
2022-07-30 20:39:15 -05:00
|
|
|
],
|
|
|
|
memory_index: [
|
|
|
|
1,
|
2023-02-15 18:49:00 -06:00
|
|
|
0,
|
2022-07-30 20:39:15 -05:00
|
|
|
],
|
|
|
|
},
|
2022-04-18 20:28:53 -05:00
|
|
|
largest_niche: Some(
|
|
|
|
Niche {
|
2023-02-15 18:49:00 -06:00
|
|
|
offset: Size(0 bytes),
|
2022-04-18 20:28:53 -05:00
|
|
|
value: Int(
|
|
|
|
I8,
|
|
|
|
false,
|
|
|
|
),
|
|
|
|
valid_range: 0..=2,
|
|
|
|
},
|
|
|
|
),
|
2022-07-30 20:39:15 -05:00
|
|
|
variants: Single {
|
|
|
|
index: 0,
|
|
|
|
},
|
2023-07-14 16:48:13 -05:00
|
|
|
max_repr_align: None,
|
2023-06-14 21:39:11 -05:00
|
|
|
unadjusted_abi_align: Align(1 bytes),
|
2022-07-30 20:39:15 -05:00
|
|
|
},
|
|
|
|
Layout {
|
|
|
|
size: Size(0 bytes),
|
2022-04-18 20:28:53 -05:00
|
|
|
align: AbiAndPrefAlign {
|
2022-04-30 11:30:11 -05:00
|
|
|
abi: Align(1 bytes),
|
2022-04-22 00:46:24 -05:00
|
|
|
pref: $PREF_ALIGN,
|
2022-04-18 20:28:53 -05:00
|
|
|
},
|
2024-10-30 01:21:20 -05:00
|
|
|
abi: Memory {
|
2022-07-30 20:39:15 -05:00
|
|
|
sized: true,
|
|
|
|
},
|
2022-04-18 20:28:53 -05:00
|
|
|
fields: Arbitrary {
|
|
|
|
offsets: [],
|
|
|
|
memory_index: [],
|
|
|
|
},
|
2022-07-30 20:39:15 -05:00
|
|
|
largest_niche: None,
|
2022-04-18 20:28:53 -05:00
|
|
|
variants: Single {
|
|
|
|
index: 1,
|
|
|
|
},
|
2023-07-14 16:48:13 -05:00
|
|
|
max_repr_align: None,
|
2023-06-14 21:39:11 -05:00
|
|
|
unadjusted_abi_align: Align(1 bytes),
|
2022-07-30 20:39:15 -05:00
|
|
|
},
|
|
|
|
Layout {
|
|
|
|
size: Size(0 bytes),
|
2022-04-18 20:28:53 -05:00
|
|
|
align: AbiAndPrefAlign {
|
2022-04-30 11:30:11 -05:00
|
|
|
abi: Align(1 bytes),
|
2022-04-22 00:46:24 -05:00
|
|
|
pref: $PREF_ALIGN,
|
2022-04-18 20:28:53 -05:00
|
|
|
},
|
2024-10-30 01:21:20 -05:00
|
|
|
abi: Memory {
|
2022-07-30 20:39:15 -05:00
|
|
|
sized: true,
|
|
|
|
},
|
2022-04-18 20:28:53 -05:00
|
|
|
fields: Arbitrary {
|
|
|
|
offsets: [],
|
|
|
|
memory_index: [],
|
|
|
|
},
|
2022-07-30 20:39:15 -05:00
|
|
|
largest_niche: None,
|
2022-04-18 20:28:53 -05:00
|
|
|
variants: Single {
|
|
|
|
index: 2,
|
|
|
|
},
|
2023-07-14 16:48:13 -05:00
|
|
|
max_repr_align: None,
|
2023-06-14 21:39:11 -05:00
|
|
|
unadjusted_abi_align: Align(1 bytes),
|
2022-04-18 20:28:53 -05:00
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
2023-07-14 16:48:13 -05:00
|
|
|
max_repr_align: None,
|
2023-06-14 21:39:11 -05:00
|
|
|
unadjusted_abi_align: Align(1 bytes),
|
2022-04-18 20:28:53 -05:00
|
|
|
}
|
2022-04-22 00:46:24 -05:00
|
|
|
--> $DIR/issue-96158-scalarpair-payload-might-be-uninit.rs:50:1
|
2022-04-18 20:28:53 -05:00
|
|
|
|
|
2022-02-13 09:27:59 -06:00
|
|
|
LL | pub enum NicheSecond {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^
|
2022-04-18 20:28:53 -05:00
|
|
|
|
|
|
|
error: aborting due to 5 previous errors
|
|
|
|
|