Auto merge of #9448 - Alexendoo:large-enum-variant-u128, r=Manishearth

Replace u128 with u64 in large_enum_variant uitest

A u128 has [an 8 byte alignment on x86](https://github.com/rust-lang/rust/issues/54341), but a 16 byte alignment on aarch64 which changes the size of the enums due to extra padding. This means the test fails on aarch64

changelog: none
This commit is contained in:
bors 2022-09-09 17:21:53 +00:00
commit 5652ccbc0f
2 changed files with 10 additions and 10 deletions

View File

@ -101,12 +101,12 @@ struct Struct2 {
#[derive(Copy, Clone)]
enum CopyableLargeEnum {
A(bool),
B([u128; 4000]),
B([u64; 8000]),
}
enum ManuallyCopyLargeEnum {
A(bool),
B([u128; 4000]),
B([u64; 8000]),
}
impl Clone for ManuallyCopyLargeEnum {

View File

@ -167,8 +167,8 @@ error: large size difference between variants
LL | / enum CopyableLargeEnum {
LL | | A(bool),
| | ------- the second-largest variant contains at least 1 bytes
LL | | B([u128; 4000]),
| | --------------- the largest variant contains at least 64000 bytes
LL | | B([u64; 8000]),
| | -------------- the largest variant contains at least 64000 bytes
LL | | }
| |_^ the entire enum is at least 64008 bytes
|
@ -180,8 +180,8 @@ LL | enum CopyableLargeEnum {
help: consider boxing the large fields to reduce the total size of the enum
--> $DIR/large_enum_variant.rs:104:5
|
LL | B([u128; 4000]),
| ^^^^^^^^^^^^^^^
LL | B([u64; 8000]),
| ^^^^^^^^^^^^^^
error: large size difference between variants
--> $DIR/large_enum_variant.rs:107:1
@ -189,8 +189,8 @@ error: large size difference between variants
LL | / enum ManuallyCopyLargeEnum {
LL | | A(bool),
| | ------- the second-largest variant contains at least 1 bytes
LL | | B([u128; 4000]),
| | --------------- the largest variant contains at least 64000 bytes
LL | | B([u64; 8000]),
| | -------------- the largest variant contains at least 64000 bytes
LL | | }
| |_^ the entire enum is at least 64008 bytes
|
@ -202,8 +202,8 @@ LL | enum ManuallyCopyLargeEnum {
help: consider boxing the large fields to reduce the total size of the enum
--> $DIR/large_enum_variant.rs:109:5
|
LL | B([u128; 4000]),
| ^^^^^^^^^^^^^^^
LL | B([u64; 8000]),
| ^^^^^^^^^^^^^^
error: large size difference between variants
--> $DIR/large_enum_variant.rs:120:1