2020-04-06 07:22:48 +00:00
|
|
|
error: layout_of(E) = Layout {
|
2021-10-13 13:58:41 +00:00
|
|
|
fields: Arbitrary {
|
|
|
|
offsets: [
|
2022-04-30 16:30:11 +00:00
|
|
|
Size(0 bytes),
|
2021-10-13 13:58:41 +00:00
|
|
|
],
|
|
|
|
memory_index: [
|
|
|
|
0,
|
|
|
|
],
|
|
|
|
},
|
|
|
|
variants: Multiple {
|
2022-03-03 12:02:12 +00:00
|
|
|
tag: Initialized {
|
2021-10-13 13:58:41 +00:00
|
|
|
value: Int(
|
|
|
|
I32,
|
|
|
|
false,
|
|
|
|
),
|
|
|
|
valid_range: 0..=0,
|
|
|
|
},
|
|
|
|
tag_encoding: Direct,
|
|
|
|
tag_field: 0,
|
|
|
|
variants: [
|
|
|
|
Layout {
|
|
|
|
fields: Arbitrary {
|
|
|
|
offsets: [],
|
|
|
|
memory_index: [],
|
|
|
|
},
|
|
|
|
variants: Single {
|
|
|
|
index: 0,
|
|
|
|
},
|
|
|
|
abi: Aggregate {
|
|
|
|
sized: true,
|
|
|
|
},
|
|
|
|
largest_niche: None,
|
|
|
|
align: AbiAndPrefAlign {
|
2022-04-30 16:30:11 +00:00
|
|
|
abi: Align(1 bytes),
|
2021-10-13 13:58:41 +00:00
|
|
|
pref: $PREF_ALIGN,
|
|
|
|
},
|
2022-04-30 16:30:11 +00:00
|
|
|
size: Size(4 bytes),
|
2021-10-13 13:58:41 +00:00
|
|
|
},
|
|
|
|
Layout {
|
|
|
|
fields: Arbitrary {
|
|
|
|
offsets: [
|
2022-04-30 16:30:11 +00:00
|
|
|
Size(4 bytes),
|
|
|
|
Size(4 bytes),
|
|
|
|
Size(8 bytes),
|
2021-10-13 13:58:41 +00:00
|
|
|
],
|
|
|
|
memory_index: [
|
|
|
|
0,
|
|
|
|
1,
|
|
|
|
2,
|
|
|
|
],
|
|
|
|
},
|
|
|
|
variants: Single {
|
|
|
|
index: 1,
|
|
|
|
},
|
|
|
|
abi: Uninhabited,
|
|
|
|
largest_niche: None,
|
|
|
|
align: AbiAndPrefAlign {
|
2022-04-30 16:30:11 +00:00
|
|
|
abi: Align(4 bytes),
|
2021-10-13 13:58:41 +00:00
|
|
|
pref: $PREF_ALIGN,
|
|
|
|
},
|
2022-04-30 16:30:11 +00:00
|
|
|
size: Size(12 bytes),
|
2021-10-13 13:58:41 +00:00
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
abi: Aggregate {
|
|
|
|
sized: true,
|
|
|
|
},
|
|
|
|
largest_niche: Some(
|
|
|
|
Niche {
|
2022-04-30 16:30:11 +00:00
|
|
|
offset: Size(0 bytes),
|
2022-03-03 12:02:12 +00:00
|
|
|
value: Int(
|
|
|
|
I32,
|
|
|
|
false,
|
|
|
|
),
|
|
|
|
valid_range: 0..=0,
|
2021-10-13 13:58:41 +00:00
|
|
|
},
|
|
|
|
),
|
|
|
|
align: AbiAndPrefAlign {
|
2022-04-30 16:30:11 +00:00
|
|
|
abi: Align(4 bytes),
|
2021-10-13 13:58:41 +00:00
|
|
|
pref: $PREF_ALIGN,
|
|
|
|
},
|
2022-04-30 16:30:11 +00:00
|
|
|
size: Size(12 bytes),
|
2021-10-13 13:58:41 +00:00
|
|
|
}
|
2020-03-21 09:07:44 +00:00
|
|
|
--> $DIR/debug.rs:6:1
|
2020-03-10 21:31:27 +00:00
|
|
|
|
|
2020-03-20 16:48:03 +00:00
|
|
|
LL | enum E { Foo, Bar(!, i32, i32) }
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2020-03-10 21:31:27 +00:00
|
|
|
|
2020-04-06 07:22:48 +00:00
|
|
|
error: layout_of(S) = Layout {
|
2021-10-13 13:58:41 +00:00
|
|
|
fields: Arbitrary {
|
|
|
|
offsets: [
|
2022-04-30 16:30:11 +00:00
|
|
|
Size(0 bytes),
|
|
|
|
Size(0 bytes),
|
|
|
|
Size(4 bytes),
|
2021-10-13 13:58:41 +00:00
|
|
|
],
|
|
|
|
memory_index: [
|
|
|
|
1,
|
|
|
|
0,
|
|
|
|
2,
|
|
|
|
],
|
|
|
|
},
|
|
|
|
variants: Single {
|
|
|
|
index: 0,
|
|
|
|
},
|
|
|
|
abi: ScalarPair(
|
2022-03-03 12:02:12 +00:00
|
|
|
Initialized {
|
2021-10-13 13:58:41 +00:00
|
|
|
value: Int(
|
|
|
|
I32,
|
|
|
|
true,
|
|
|
|
),
|
|
|
|
valid_range: 0..=4294967295,
|
|
|
|
},
|
2022-03-03 12:02:12 +00:00
|
|
|
Initialized {
|
2021-10-13 13:58:41 +00:00
|
|
|
value: Int(
|
|
|
|
I32,
|
|
|
|
true,
|
|
|
|
),
|
|
|
|
valid_range: 0..=4294967295,
|
|
|
|
},
|
|
|
|
),
|
|
|
|
largest_niche: None,
|
|
|
|
align: AbiAndPrefAlign {
|
2022-04-30 16:30:11 +00:00
|
|
|
abi: Align(4 bytes),
|
2021-10-13 13:58:41 +00:00
|
|
|
pref: $PREF_ALIGN,
|
|
|
|
},
|
2022-04-30 16:30:11 +00:00
|
|
|
size: Size(8 bytes),
|
2021-10-13 13:58:41 +00:00
|
|
|
}
|
2020-03-21 09:07:44 +00:00
|
|
|
--> $DIR/debug.rs:9:1
|
2020-03-20 16:48:03 +00:00
|
|
|
|
|
|
|
|
LL | struct S { f1: i32, f2: (), f3: i32 }
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
2020-04-06 07:22:48 +00:00
|
|
|
error: layout_of(U) = Layout {
|
2021-10-13 13:58:41 +00:00
|
|
|
fields: Union(
|
|
|
|
2,
|
|
|
|
),
|
|
|
|
variants: Single {
|
|
|
|
index: 0,
|
|
|
|
},
|
|
|
|
abi: Aggregate {
|
|
|
|
sized: true,
|
|
|
|
},
|
|
|
|
largest_niche: None,
|
|
|
|
align: AbiAndPrefAlign {
|
2022-04-30 16:30:11 +00:00
|
|
|
abi: Align(4 bytes),
|
2021-10-13 13:58:41 +00:00
|
|
|
pref: $PREF_ALIGN,
|
|
|
|
},
|
2022-04-30 16:30:11 +00:00
|
|
|
size: Size(8 bytes),
|
2021-10-13 13:58:41 +00:00
|
|
|
}
|
2020-03-21 09:07:44 +00:00
|
|
|
--> $DIR/debug.rs:12:1
|
2020-03-20 16:48:03 +00:00
|
|
|
|
|
|
|
|
LL | union U { f1: (i32, i32), f3: i32 }
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
2020-04-06 07:22:48 +00:00
|
|
|
error: layout_of(std::result::Result<i32, i32>) = Layout {
|
2021-10-13 13:58:41 +00:00
|
|
|
fields: Arbitrary {
|
|
|
|
offsets: [
|
2022-04-30 16:30:11 +00:00
|
|
|
Size(0 bytes),
|
2021-10-13 13:58:41 +00:00
|
|
|
],
|
|
|
|
memory_index: [
|
|
|
|
0,
|
|
|
|
],
|
|
|
|
},
|
|
|
|
variants: Multiple {
|
2022-03-03 12:02:12 +00:00
|
|
|
tag: Initialized {
|
2021-10-13 13:58:41 +00:00
|
|
|
value: Int(
|
|
|
|
I32,
|
|
|
|
false,
|
|
|
|
),
|
|
|
|
valid_range: 0..=1,
|
|
|
|
},
|
|
|
|
tag_encoding: Direct,
|
|
|
|
tag_field: 0,
|
|
|
|
variants: [
|
|
|
|
Layout {
|
|
|
|
fields: Arbitrary {
|
|
|
|
offsets: [
|
2022-04-30 16:30:11 +00:00
|
|
|
Size(4 bytes),
|
2021-10-13 13:58:41 +00:00
|
|
|
],
|
|
|
|
memory_index: [
|
|
|
|
0,
|
|
|
|
],
|
|
|
|
},
|
|
|
|
variants: Single {
|
|
|
|
index: 0,
|
|
|
|
},
|
|
|
|
abi: Aggregate {
|
|
|
|
sized: true,
|
|
|
|
},
|
|
|
|
largest_niche: None,
|
|
|
|
align: AbiAndPrefAlign {
|
2022-04-30 16:30:11 +00:00
|
|
|
abi: Align(4 bytes),
|
2021-10-13 13:58:41 +00:00
|
|
|
pref: $PREF_ALIGN,
|
|
|
|
},
|
2022-04-30 16:30:11 +00:00
|
|
|
size: Size(8 bytes),
|
2021-10-13 13:58:41 +00:00
|
|
|
},
|
|
|
|
Layout {
|
|
|
|
fields: Arbitrary {
|
|
|
|
offsets: [
|
2022-04-30 16:30:11 +00:00
|
|
|
Size(4 bytes),
|
2021-10-13 13:58:41 +00:00
|
|
|
],
|
|
|
|
memory_index: [
|
|
|
|
0,
|
|
|
|
],
|
|
|
|
},
|
|
|
|
variants: Single {
|
|
|
|
index: 1,
|
|
|
|
},
|
|
|
|
abi: Aggregate {
|
|
|
|
sized: true,
|
|
|
|
},
|
|
|
|
largest_niche: None,
|
|
|
|
align: AbiAndPrefAlign {
|
2022-04-30 16:30:11 +00:00
|
|
|
abi: Align(4 bytes),
|
2021-10-13 13:58:41 +00:00
|
|
|
pref: $PREF_ALIGN,
|
|
|
|
},
|
2022-04-30 16:30:11 +00:00
|
|
|
size: Size(8 bytes),
|
2021-10-13 13:58:41 +00:00
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
abi: ScalarPair(
|
2022-03-03 12:02:12 +00:00
|
|
|
Initialized {
|
2021-10-13 13:58:41 +00:00
|
|
|
value: Int(
|
|
|
|
I32,
|
|
|
|
false,
|
|
|
|
),
|
|
|
|
valid_range: 0..=1,
|
|
|
|
},
|
2022-03-03 12:02:12 +00:00
|
|
|
Initialized {
|
2021-10-13 13:58:41 +00:00
|
|
|
value: Int(
|
|
|
|
I32,
|
|
|
|
true,
|
|
|
|
),
|
|
|
|
valid_range: 0..=4294967295,
|
|
|
|
},
|
|
|
|
),
|
|
|
|
largest_niche: Some(
|
|
|
|
Niche {
|
2022-04-30 16:30:11 +00:00
|
|
|
offset: Size(0 bytes),
|
2022-03-03 12:02:12 +00:00
|
|
|
value: Int(
|
|
|
|
I32,
|
|
|
|
false,
|
|
|
|
),
|
|
|
|
valid_range: 0..=1,
|
2021-10-13 13:58:41 +00:00
|
|
|
},
|
|
|
|
),
|
|
|
|
align: AbiAndPrefAlign {
|
2022-04-30 16:30:11 +00:00
|
|
|
abi: Align(4 bytes),
|
2021-10-13 13:58:41 +00:00
|
|
|
pref: $PREF_ALIGN,
|
|
|
|
},
|
2022-04-30 16:30:11 +00:00
|
|
|
size: Size(8 bytes),
|
2021-10-13 13:58:41 +00:00
|
|
|
}
|
2020-03-21 09:07:44 +00:00
|
|
|
--> $DIR/debug.rs:15:1
|
2020-03-20 16:48:03 +00:00
|
|
|
|
|
|
|
|
LL | type Test = Result<i32, i32>;
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
2020-04-06 07:22:48 +00:00
|
|
|
error: layout_of(i32) = Layout {
|
2021-10-13 13:58:41 +00:00
|
|
|
fields: Primitive,
|
|
|
|
variants: Single {
|
|
|
|
index: 0,
|
|
|
|
},
|
|
|
|
abi: Scalar(
|
2022-03-03 12:02:12 +00:00
|
|
|
Initialized {
|
2021-10-13 13:58:41 +00:00
|
|
|
value: Int(
|
|
|
|
I32,
|
|
|
|
true,
|
|
|
|
),
|
|
|
|
valid_range: 0..=4294967295,
|
|
|
|
},
|
|
|
|
),
|
|
|
|
largest_niche: None,
|
|
|
|
align: AbiAndPrefAlign {
|
2022-04-30 16:30:11 +00:00
|
|
|
abi: Align(4 bytes),
|
2021-10-13 13:58:41 +00:00
|
|
|
pref: $PREF_ALIGN,
|
|
|
|
},
|
2022-04-30 16:30:11 +00:00
|
|
|
size: Size(4 bytes),
|
2021-10-13 13:58:41 +00:00
|
|
|
}
|
2020-04-05 15:07:06 +00:00
|
|
|
--> $DIR/debug.rs:18:1
|
|
|
|
|
|
|
|
|
LL | type T = impl std::fmt::Debug;
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: aborting due to 5 previous errors
|
2020-03-10 21:31:27 +00:00
|
|
|
|