2020-04-06 07:22:48 +00:00
|
|
|
error: layout_of(E) = Layout {
|
2022-07-31 01:39:15 +00:00
|
|
|
size: Size(12 bytes),
|
|
|
|
align: AbiAndPrefAlign {
|
|
|
|
abi: Align(4 bytes),
|
2023-08-25 21:01:06 +00:00
|
|
|
pref: $SOME_ALIGN,
|
2022-07-31 01:39:15 +00:00
|
|
|
},
|
|
|
|
abi: Aggregate {
|
|
|
|
sized: true,
|
|
|
|
},
|
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,
|
|
|
|
],
|
|
|
|
},
|
2022-07-31 01:39:15 +00:00
|
|
|
largest_niche: Some(
|
|
|
|
Niche {
|
|
|
|
offset: Size(0 bytes),
|
|
|
|
value: Int(
|
|
|
|
I32,
|
|
|
|
false,
|
|
|
|
),
|
|
|
|
valid_range: 0..=0,
|
|
|
|
},
|
|
|
|
),
|
2021-10-13 13:58:41 +00:00
|
|
|
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 {
|
2022-07-31 01:39:15 +00:00
|
|
|
size: Size(4 bytes),
|
|
|
|
align: AbiAndPrefAlign {
|
|
|
|
abi: Align(1 bytes),
|
2023-08-25 21:01:06 +00:00
|
|
|
pref: $SOME_ALIGN,
|
2022-07-31 01:39:15 +00:00
|
|
|
},
|
|
|
|
abi: Aggregate {
|
|
|
|
sized: true,
|
|
|
|
},
|
2021-10-13 13:58:41 +00:00
|
|
|
fields: Arbitrary {
|
|
|
|
offsets: [],
|
|
|
|
memory_index: [],
|
|
|
|
},
|
2022-07-31 01:39:15 +00:00
|
|
|
largest_niche: None,
|
2021-10-13 13:58:41 +00:00
|
|
|
variants: Single {
|
|
|
|
index: 0,
|
|
|
|
},
|
2023-07-14 21:48:13 +00:00
|
|
|
max_repr_align: None,
|
2023-06-15 02:39:11 +00:00
|
|
|
unadjusted_abi_align: Align(1 bytes),
|
2022-07-31 01:39:15 +00:00
|
|
|
},
|
|
|
|
Layout {
|
|
|
|
size: Size(12 bytes),
|
2021-10-13 13:58:41 +00:00
|
|
|
align: AbiAndPrefAlign {
|
2022-07-31 01:39:15 +00:00
|
|
|
abi: Align(4 bytes),
|
2023-08-25 21:01:06 +00:00
|
|
|
pref: $SOME_ALIGN,
|
2021-10-13 13:58:41 +00:00
|
|
|
},
|
2022-07-31 01:39:15 +00:00
|
|
|
abi: Uninhabited,
|
2021-10-13 13:58:41 +00:00
|
|
|
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,
|
|
|
|
],
|
|
|
|
},
|
2022-07-31 01:39:15 +00:00
|
|
|
largest_niche: None,
|
2021-10-13 13:58:41 +00:00
|
|
|
variants: Single {
|
|
|
|
index: 1,
|
|
|
|
},
|
2023-07-14 21:48:13 +00:00
|
|
|
max_repr_align: None,
|
2023-06-15 02:39:11 +00:00
|
|
|
unadjusted_abi_align: Align(4 bytes),
|
2021-10-13 13:58:41 +00:00
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
2023-07-14 21:48:13 +00:00
|
|
|
max_repr_align: None,
|
2023-06-15 02:39:11 +00:00
|
|
|
unadjusted_abi_align: Align(4 bytes),
|
2021-10-13 13:58:41 +00:00
|
|
|
}
|
2023-02-19 01:42:16 +00:00
|
|
|
--> $DIR/debug.rs:7:1
|
2020-03-10 21:31:27 +00:00
|
|
|
|
|
2020-03-20 16:48:03 +00:00
|
|
|
LL | enum E { Foo, Bar(!, i32, i32) }
|
2022-02-13 15:27:59 +00:00
|
|
|
| ^^^^^^
|
2020-03-10 21:31:27 +00:00
|
|
|
|
2020-04-06 07:22:48 +00:00
|
|
|
error: layout_of(S) = Layout {
|
2022-07-31 01:39:15 +00:00
|
|
|
size: Size(8 bytes),
|
|
|
|
align: AbiAndPrefAlign {
|
|
|
|
abi: Align(4 bytes),
|
2023-08-25 21:01:06 +00:00
|
|
|
pref: $SOME_ALIGN,
|
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,
|
|
|
|
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,
|
|
|
|
},
|
|
|
|
),
|
2022-07-31 01:39:15 +00:00
|
|
|
fields: Arbitrary {
|
|
|
|
offsets: [
|
|
|
|
Size(0 bytes),
|
2023-08-27 16:06:59 +00:00
|
|
|
Size(8 bytes),
|
2022-07-31 01:39:15 +00:00
|
|
|
Size(4 bytes),
|
|
|
|
],
|
|
|
|
memory_index: [
|
|
|
|
0,
|
|
|
|
2,
|
2023-08-27 16:06:59 +00:00
|
|
|
1,
|
2022-07-31 01:39:15 +00:00
|
|
|
],
|
|
|
|
},
|
2021-10-13 13:58:41 +00:00
|
|
|
largest_niche: None,
|
2022-07-31 01:39:15 +00:00
|
|
|
variants: Single {
|
|
|
|
index: 0,
|
2021-10-13 13:58:41 +00:00
|
|
|
},
|
2023-07-14 21:48:13 +00:00
|
|
|
max_repr_align: None,
|
2023-06-15 02:39:11 +00:00
|
|
|
unadjusted_abi_align: Align(4 bytes),
|
2021-10-13 13:58:41 +00:00
|
|
|
}
|
2023-02-19 01:42:16 +00:00
|
|
|
--> $DIR/debug.rs:10:1
|
2020-03-20 16:48:03 +00:00
|
|
|
|
|
|
|
|
LL | struct S { f1: i32, f2: (), f3: i32 }
|
2022-02-13 15:27:59 +00:00
|
|
|
| ^^^^^^^^
|
2020-03-20 16:48:03 +00:00
|
|
|
|
2020-04-06 07:22:48 +00:00
|
|
|
error: layout_of(U) = Layout {
|
2022-07-31 01:39:15 +00:00
|
|
|
size: Size(8 bytes),
|
|
|
|
align: AbiAndPrefAlign {
|
|
|
|
abi: Align(4 bytes),
|
2023-08-25 21:01:06 +00:00
|
|
|
pref: $SOME_ALIGN,
|
2021-10-13 13:58:41 +00:00
|
|
|
},
|
|
|
|
abi: Aggregate {
|
|
|
|
sized: true,
|
|
|
|
},
|
2022-07-31 01:39:15 +00:00
|
|
|
fields: Union(
|
|
|
|
2,
|
|
|
|
),
|
2021-10-13 13:58:41 +00:00
|
|
|
largest_niche: None,
|
2022-07-31 01:39:15 +00:00
|
|
|
variants: Single {
|
|
|
|
index: 0,
|
2021-10-13 13:58:41 +00:00
|
|
|
},
|
2023-07-14 21:48:13 +00:00
|
|
|
max_repr_align: None,
|
2023-06-15 02:39:11 +00:00
|
|
|
unadjusted_abi_align: Align(4 bytes),
|
2021-10-13 13:58:41 +00:00
|
|
|
}
|
2023-02-19 01:42:16 +00:00
|
|
|
--> $DIR/debug.rs:13:1
|
2020-03-20 16:48:03 +00:00
|
|
|
|
|
|
|
|
LL | union U { f1: (i32, i32), f3: i32 }
|
2022-02-13 15:27:59 +00:00
|
|
|
| ^^^^^^^
|
2020-03-20 16:48:03 +00:00
|
|
|
|
2023-09-07 05:14:40 +00:00
|
|
|
error: layout_of(Result<i32, i32>) = Layout {
|
2022-07-31 01:39:15 +00:00
|
|
|
size: Size(8 bytes),
|
|
|
|
align: AbiAndPrefAlign {
|
|
|
|
abi: Align(4 bytes),
|
2023-08-25 21:01:06 +00:00
|
|
|
pref: $SOME_ALIGN,
|
2022-07-31 01:39:15 +00:00
|
|
|
},
|
|
|
|
abi: ScalarPair(
|
|
|
|
Initialized {
|
|
|
|
value: Int(
|
|
|
|
I32,
|
|
|
|
false,
|
|
|
|
),
|
|
|
|
valid_range: 0..=1,
|
|
|
|
},
|
|
|
|
Initialized {
|
|
|
|
value: Int(
|
|
|
|
I32,
|
|
|
|
true,
|
|
|
|
),
|
|
|
|
valid_range: 0..=4294967295,
|
|
|
|
},
|
|
|
|
),
|
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,
|
|
|
|
],
|
|
|
|
},
|
2022-07-31 01:39:15 +00:00
|
|
|
largest_niche: Some(
|
|
|
|
Niche {
|
|
|
|
offset: Size(0 bytes),
|
|
|
|
value: Int(
|
|
|
|
I32,
|
|
|
|
false,
|
|
|
|
),
|
|
|
|
valid_range: 0..=1,
|
|
|
|
},
|
|
|
|
),
|
2021-10-13 13:58:41 +00:00
|
|
|
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 {
|
2022-07-31 01:39:15 +00:00
|
|
|
size: Size(8 bytes),
|
|
|
|
align: AbiAndPrefAlign {
|
|
|
|
abi: Align(4 bytes),
|
2023-08-25 21:01:06 +00:00
|
|
|
pref: $SOME_ALIGN,
|
2021-10-13 13:58:41 +00:00
|
|
|
},
|
2022-05-09 15:29:59 +00:00
|
|
|
abi: ScalarPair(
|
|
|
|
Initialized {
|
|
|
|
value: Int(
|
|
|
|
I32,
|
|
|
|
false,
|
|
|
|
),
|
|
|
|
valid_range: 0..=1,
|
|
|
|
},
|
|
|
|
Initialized {
|
|
|
|
value: Int(
|
|
|
|
I32,
|
|
|
|
true,
|
|
|
|
),
|
|
|
|
valid_range: 0..=4294967295,
|
|
|
|
},
|
|
|
|
),
|
2021-10-13 13:58:41 +00:00
|
|
|
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,
|
|
|
|
],
|
|
|
|
},
|
2022-07-31 01:39:15 +00:00
|
|
|
largest_niche: None,
|
2021-10-13 13:58:41 +00:00
|
|
|
variants: Single {
|
2022-07-31 01:39:15 +00:00
|
|
|
index: 0,
|
|
|
|
},
|
2023-07-14 21:48:13 +00:00
|
|
|
max_repr_align: None,
|
2023-06-15 02:39:11 +00:00
|
|
|
unadjusted_abi_align: Align(4 bytes),
|
2022-07-31 01:39:15 +00:00
|
|
|
},
|
|
|
|
Layout {
|
|
|
|
size: Size(8 bytes),
|
|
|
|
align: AbiAndPrefAlign {
|
|
|
|
abi: Align(4 bytes),
|
2023-08-25 21:01:06 +00:00
|
|
|
pref: $SOME_ALIGN,
|
2021-10-13 13:58:41 +00:00
|
|
|
},
|
2022-05-09 15:29:59 +00:00
|
|
|
abi: ScalarPair(
|
|
|
|
Initialized {
|
|
|
|
value: Int(
|
|
|
|
I32,
|
|
|
|
false,
|
|
|
|
),
|
|
|
|
valid_range: 0..=1,
|
|
|
|
},
|
|
|
|
Initialized {
|
|
|
|
value: Int(
|
|
|
|
I32,
|
|
|
|
true,
|
|
|
|
),
|
|
|
|
valid_range: 0..=4294967295,
|
|
|
|
},
|
|
|
|
),
|
2022-07-31 01:39:15 +00:00
|
|
|
fields: Arbitrary {
|
|
|
|
offsets: [
|
|
|
|
Size(4 bytes),
|
|
|
|
],
|
|
|
|
memory_index: [
|
|
|
|
0,
|
|
|
|
],
|
|
|
|
},
|
2021-10-13 13:58:41 +00:00
|
|
|
largest_niche: None,
|
2022-07-31 01:39:15 +00:00
|
|
|
variants: Single {
|
|
|
|
index: 1,
|
2021-10-13 13:58:41 +00:00
|
|
|
},
|
2023-07-14 21:48:13 +00:00
|
|
|
max_repr_align: None,
|
2023-06-15 02:39:11 +00:00
|
|
|
unadjusted_abi_align: Align(4 bytes),
|
2021-10-13 13:58:41 +00:00
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
2023-07-14 21:48:13 +00:00
|
|
|
max_repr_align: None,
|
2023-06-15 02:39:11 +00:00
|
|
|
unadjusted_abi_align: Align(4 bytes),
|
2021-10-13 13:58:41 +00:00
|
|
|
}
|
2023-02-19 01:42:16 +00:00
|
|
|
--> $DIR/debug.rs:16:1
|
2020-03-20 16:48:03 +00:00
|
|
|
|
|
|
|
|
LL | type Test = Result<i32, i32>;
|
2022-02-13 15:27:59 +00:00
|
|
|
| ^^^^^^^^^
|
2020-03-20 16:48:03 +00:00
|
|
|
|
2020-04-06 07:22:48 +00:00
|
|
|
error: layout_of(i32) = Layout {
|
2022-07-31 01:39:15 +00:00
|
|
|
size: Size(4 bytes),
|
|
|
|
align: AbiAndPrefAlign {
|
|
|
|
abi: Align(4 bytes),
|
2023-08-25 21:01:06 +00:00
|
|
|
pref: $SOME_ALIGN,
|
2021-10-13 13:58:41 +00:00
|
|
|
},
|
|
|
|
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,
|
|
|
|
},
|
|
|
|
),
|
2022-07-31 01:39:15 +00:00
|
|
|
fields: Primitive,
|
2021-10-13 13:58:41 +00:00
|
|
|
largest_niche: None,
|
2022-07-31 01:39:15 +00:00
|
|
|
variants: Single {
|
|
|
|
index: 0,
|
2021-10-13 13:58:41 +00:00
|
|
|
},
|
2023-07-14 21:48:13 +00:00
|
|
|
max_repr_align: None,
|
2023-06-15 02:39:11 +00:00
|
|
|
unadjusted_abi_align: Align(4 bytes),
|
2021-10-13 13:58:41 +00:00
|
|
|
}
|
2023-02-19 01:42:16 +00:00
|
|
|
--> $DIR/debug.rs:19:1
|
2020-04-05 15:07:06 +00:00
|
|
|
|
|
|
|
|
LL | type T = impl std::fmt::Debug;
|
2022-02-13 15:27:59 +00:00
|
|
|
| ^^^^^^
|
2020-04-05 15:07:06 +00:00
|
|
|
|
2022-11-03 14:45:42 +00:00
|
|
|
error: layout_of(V) = Layout {
|
|
|
|
size: Size(2 bytes),
|
|
|
|
align: AbiAndPrefAlign {
|
|
|
|
abi: Align(2 bytes),
|
2023-08-25 21:01:06 +00:00
|
|
|
pref: $SOME_ALIGN,
|
2022-11-03 14:45:42 +00:00
|
|
|
},
|
|
|
|
abi: Aggregate {
|
|
|
|
sized: true,
|
|
|
|
},
|
|
|
|
fields: Union(
|
|
|
|
2,
|
|
|
|
),
|
|
|
|
largest_niche: None,
|
|
|
|
variants: Single {
|
|
|
|
index: 0,
|
|
|
|
},
|
2023-07-14 21:48:13 +00:00
|
|
|
max_repr_align: None,
|
2023-06-15 02:39:11 +00:00
|
|
|
unadjusted_abi_align: Align(2 bytes),
|
2022-11-03 14:45:42 +00:00
|
|
|
}
|
2023-09-02 12:03:25 +00:00
|
|
|
--> $DIR/debug.rs:25:1
|
2022-11-03 14:45:42 +00:00
|
|
|
|
|
|
|
|
LL | pub union V {
|
|
|
|
| ^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: layout_of(W) = Layout {
|
|
|
|
size: Size(2 bytes),
|
|
|
|
align: AbiAndPrefAlign {
|
|
|
|
abi: Align(2 bytes),
|
2023-08-25 21:01:06 +00:00
|
|
|
pref: $SOME_ALIGN,
|
2022-11-03 14:45:42 +00:00
|
|
|
},
|
|
|
|
abi: Aggregate {
|
|
|
|
sized: true,
|
|
|
|
},
|
|
|
|
fields: Union(
|
|
|
|
2,
|
|
|
|
),
|
|
|
|
largest_niche: None,
|
|
|
|
variants: Single {
|
|
|
|
index: 0,
|
|
|
|
},
|
2023-07-14 21:48:13 +00:00
|
|
|
max_repr_align: None,
|
2023-06-15 02:39:11 +00:00
|
|
|
unadjusted_abi_align: Align(2 bytes),
|
2022-11-03 14:45:42 +00:00
|
|
|
}
|
2023-09-02 12:03:25 +00:00
|
|
|
--> $DIR/debug.rs:31:1
|
2022-11-03 14:45:42 +00:00
|
|
|
|
|
|
|
|
LL | pub union W {
|
|
|
|
| ^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: layout_of(Y) = Layout {
|
|
|
|
size: Size(0 bytes),
|
|
|
|
align: AbiAndPrefAlign {
|
|
|
|
abi: Align(2 bytes),
|
2023-08-25 21:01:06 +00:00
|
|
|
pref: $SOME_ALIGN,
|
2022-11-03 14:45:42 +00:00
|
|
|
},
|
|
|
|
abi: Aggregate {
|
|
|
|
sized: true,
|
|
|
|
},
|
|
|
|
fields: Union(
|
|
|
|
2,
|
|
|
|
),
|
|
|
|
largest_niche: None,
|
|
|
|
variants: Single {
|
|
|
|
index: 0,
|
|
|
|
},
|
2023-07-14 21:48:13 +00:00
|
|
|
max_repr_align: None,
|
2023-06-15 02:39:11 +00:00
|
|
|
unadjusted_abi_align: Align(2 bytes),
|
2022-11-03 14:45:42 +00:00
|
|
|
}
|
2023-09-02 12:03:25 +00:00
|
|
|
--> $DIR/debug.rs:37:1
|
2022-11-03 14:45:42 +00:00
|
|
|
|
|
|
|
|
LL | pub union Y {
|
|
|
|
| ^^^^^^^^^^^
|
|
|
|
|
2023-02-19 01:42:16 +00:00
|
|
|
error: layout_of(P1) = Layout {
|
|
|
|
size: Size(4 bytes),
|
|
|
|
align: AbiAndPrefAlign {
|
|
|
|
abi: Align(1 bytes),
|
2023-08-25 21:01:06 +00:00
|
|
|
pref: $SOME_ALIGN,
|
2023-02-19 01:42:16 +00:00
|
|
|
},
|
|
|
|
abi: Aggregate {
|
|
|
|
sized: true,
|
|
|
|
},
|
|
|
|
fields: Union(
|
|
|
|
1,
|
|
|
|
),
|
|
|
|
largest_niche: None,
|
|
|
|
variants: Single {
|
|
|
|
index: 0,
|
|
|
|
},
|
2023-07-14 21:48:13 +00:00
|
|
|
max_repr_align: None,
|
2023-06-15 02:39:11 +00:00
|
|
|
unadjusted_abi_align: Align(1 bytes),
|
2023-02-19 01:42:16 +00:00
|
|
|
}
|
2023-09-02 12:03:25 +00:00
|
|
|
--> $DIR/debug.rs:44:1
|
2023-02-19 01:42:16 +00:00
|
|
|
|
|
|
|
|
LL | union P1 { x: u32 }
|
|
|
|
| ^^^^^^^^
|
|
|
|
|
|
|
|
error: layout_of(P2) = Layout {
|
|
|
|
size: Size(8 bytes),
|
|
|
|
align: AbiAndPrefAlign {
|
|
|
|
abi: Align(1 bytes),
|
2023-08-25 21:01:06 +00:00
|
|
|
pref: $SOME_ALIGN,
|
2023-02-19 01:42:16 +00:00
|
|
|
},
|
|
|
|
abi: Aggregate {
|
|
|
|
sized: true,
|
|
|
|
},
|
|
|
|
fields: Union(
|
|
|
|
1,
|
|
|
|
),
|
|
|
|
largest_niche: None,
|
|
|
|
variants: Single {
|
|
|
|
index: 0,
|
|
|
|
},
|
2023-07-14 21:48:13 +00:00
|
|
|
max_repr_align: None,
|
2023-06-15 02:39:11 +00:00
|
|
|
unadjusted_abi_align: Align(1 bytes),
|
2023-02-19 01:42:16 +00:00
|
|
|
}
|
2023-09-02 12:03:25 +00:00
|
|
|
--> $DIR/debug.rs:48:1
|
2023-02-19 01:42:16 +00:00
|
|
|
|
|
|
|
|
LL | union P2 { x: (u32, u32) }
|
|
|
|
| ^^^^^^^^
|
|
|
|
|
|
|
|
error: layout_of(P3) = Layout {
|
|
|
|
size: Size(16 bytes),
|
|
|
|
align: AbiAndPrefAlign {
|
|
|
|
abi: Align(1 bytes),
|
2023-08-25 21:01:06 +00:00
|
|
|
pref: $SOME_ALIGN,
|
2023-02-19 01:42:16 +00:00
|
|
|
},
|
|
|
|
abi: Aggregate {
|
|
|
|
sized: true,
|
|
|
|
},
|
|
|
|
fields: Union(
|
|
|
|
1,
|
|
|
|
),
|
|
|
|
largest_niche: None,
|
|
|
|
variants: Single {
|
|
|
|
index: 0,
|
|
|
|
},
|
2023-07-14 21:48:13 +00:00
|
|
|
max_repr_align: None,
|
2023-06-15 02:39:11 +00:00
|
|
|
unadjusted_abi_align: Align(1 bytes),
|
2023-02-19 01:42:16 +00:00
|
|
|
}
|
2023-09-02 12:03:25 +00:00
|
|
|
--> $DIR/debug.rs:56:1
|
2023-02-19 01:42:16 +00:00
|
|
|
|
|
|
|
|
LL | union P3 { x: F32x4 }
|
|
|
|
| ^^^^^^^^
|
|
|
|
|
|
|
|
error: layout_of(P4) = Layout {
|
|
|
|
size: Size(12 bytes),
|
|
|
|
align: AbiAndPrefAlign {
|
|
|
|
abi: Align(1 bytes),
|
2023-08-25 21:01:06 +00:00
|
|
|
pref: $SOME_ALIGN,
|
2023-02-19 01:42:16 +00:00
|
|
|
},
|
|
|
|
abi: Aggregate {
|
|
|
|
sized: true,
|
|
|
|
},
|
|
|
|
fields: Union(
|
|
|
|
1,
|
|
|
|
),
|
|
|
|
largest_niche: None,
|
|
|
|
variants: Single {
|
|
|
|
index: 0,
|
|
|
|
},
|
2023-07-14 21:48:13 +00:00
|
|
|
max_repr_align: None,
|
2023-06-15 02:39:11 +00:00
|
|
|
unadjusted_abi_align: Align(1 bytes),
|
2023-02-19 01:42:16 +00:00
|
|
|
}
|
2023-09-02 12:03:25 +00:00
|
|
|
--> $DIR/debug.rs:60:1
|
2023-02-19 01:42:16 +00:00
|
|
|
|
|
|
|
|
LL | union P4 { x: E }
|
|
|
|
| ^^^^^^^^
|
|
|
|
|
2022-12-01 07:16:57 +00:00
|
|
|
error: layout_of(P5) = Layout {
|
|
|
|
size: Size(1 bytes),
|
|
|
|
align: AbiAndPrefAlign {
|
|
|
|
abi: Align(1 bytes),
|
2023-08-25 21:01:06 +00:00
|
|
|
pref: $SOME_ALIGN,
|
2022-12-01 07:16:57 +00:00
|
|
|
},
|
|
|
|
abi: Scalar(
|
|
|
|
Union {
|
|
|
|
value: Int(
|
|
|
|
I8,
|
|
|
|
false,
|
|
|
|
),
|
|
|
|
},
|
|
|
|
),
|
|
|
|
fields: Union(
|
|
|
|
2,
|
|
|
|
),
|
|
|
|
largest_niche: None,
|
|
|
|
variants: Single {
|
|
|
|
index: 0,
|
|
|
|
},
|
2023-07-14 21:48:13 +00:00
|
|
|
max_repr_align: None,
|
2023-06-15 02:39:11 +00:00
|
|
|
unadjusted_abi_align: Align(1 bytes),
|
2022-12-01 07:16:57 +00:00
|
|
|
}
|
2023-09-02 12:03:25 +00:00
|
|
|
--> $DIR/debug.rs:64:1
|
2022-12-01 07:16:57 +00:00
|
|
|
|
|
|
|
|
LL | union P5 { zst: [u16; 0], byte: u8 }
|
|
|
|
| ^^^^^^^^
|
|
|
|
|
2023-09-07 05:14:40 +00:00
|
|
|
error: layout_of(MaybeUninit<u8>) = Layout {
|
2022-11-03 14:45:42 +00:00
|
|
|
size: Size(1 bytes),
|
|
|
|
align: AbiAndPrefAlign {
|
|
|
|
abi: Align(1 bytes),
|
2023-08-25 21:01:06 +00:00
|
|
|
pref: $SOME_ALIGN,
|
2022-11-03 14:45:42 +00:00
|
|
|
},
|
|
|
|
abi: Scalar(
|
|
|
|
Union {
|
|
|
|
value: Int(
|
|
|
|
I8,
|
|
|
|
false,
|
|
|
|
),
|
|
|
|
},
|
|
|
|
),
|
|
|
|
fields: Union(
|
|
|
|
2,
|
|
|
|
),
|
|
|
|
largest_niche: None,
|
|
|
|
variants: Single {
|
|
|
|
index: 0,
|
|
|
|
},
|
2023-07-14 21:48:13 +00:00
|
|
|
max_repr_align: None,
|
2023-06-15 02:39:11 +00:00
|
|
|
unadjusted_abi_align: Align(1 bytes),
|
2022-11-03 14:45:42 +00:00
|
|
|
}
|
2023-09-02 12:03:25 +00:00
|
|
|
--> $DIR/debug.rs:67:1
|
2022-11-03 14:45:42 +00:00
|
|
|
|
|
|
|
|
LL | type X = std::mem::MaybeUninit<u8>;
|
|
|
|
| ^^^^^^
|
|
|
|
|
2023-09-02 12:03:25 +00:00
|
|
|
error: `#[rustc_layout]` can only be applied to `struct`/`enum`/`union` declarations and type aliases
|
|
|
|
--> $DIR/debug.rs:70:1
|
|
|
|
|
|
|
|
|
LL | const C: () = ();
|
|
|
|
| ^^^^^^^^^^^
|
|
|
|
|
2023-09-09 14:52:20 +00:00
|
|
|
error[E0277]: the size for values of type `str` cannot be known at compilation time
|
2023-09-09 15:43:20 +00:00
|
|
|
--> $DIR/debug.rs:78:19
|
2023-09-09 14:52:20 +00:00
|
|
|
|
|
|
|
|
LL | type Impossible = (str, str);
|
2023-09-09 15:43:20 +00:00
|
|
|
| ^^^^^^^^^^ doesn't have a size known at compile-time
|
2023-09-09 14:52:20 +00:00
|
|
|
|
|
|
|
|
= help: the trait `Sized` is not implemented for `str`
|
|
|
|
= note: only the last element of a tuple may have a dynamically sized type
|
|
|
|
|
2023-09-09 15:39:53 +00:00
|
|
|
error: `#[rustc_layout]` can only be applied to `struct`/`enum`/`union` declarations and type aliases
|
|
|
|
--> $DIR/debug.rs:74:5
|
|
|
|
|
|
|
|
|
LL | const C: () = ();
|
|
|
|
| ^^^^^^^^^^^
|
|
|
|
|
2023-09-09 14:52:20 +00:00
|
|
|
error: aborting due to 17 previous errors
|
2020-03-10 21:31:27 +00:00
|
|
|
|
2023-09-09 14:52:20 +00:00
|
|
|
For more information about this error, try `rustc --explain E0277`.
|