Skip to content

Replace u128 with u64 in large_enum_variant uitest #9448

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tests/ui/large_enum_variant.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
16 changes: 8 additions & 8 deletions tests/ui/large_enum_variant.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -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
|
Expand All @@ -180,17 +180,17 @@ 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
|
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
|
Expand All @@ -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
Expand Down