@@ -2,9 +2,14 @@ error: large size difference between variants
22 --> $DIR/large_enum_variant.rs:7:5
33 |
44LL | B([i32; 8000]),
5- | ^^^^^^^^^^^^^^
5+ | ^^^^^^^^^^^^^^ this variant is 32000 bytes
66 |
77 = note: `-D clippy::large-enum-variant` implied by `-D warnings`
8+ note: and the second-largest variant is 4 bytes:
9+ --> $DIR/large_enum_variant.rs:6:5
10+ |
11+ LL | A(i32),
12+ | ^^^^^^
813help: consider boxing the large fields to reduce the total size of the enum
914 |
1015LL | B(Box<[i32; 8000]>),
@@ -14,8 +19,13 @@ error: large size difference between variants
1419 --> $DIR/large_enum_variant.rs:31:5
1520 |
1621LL | ContainingLargeEnum(LargeEnum),
17- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
22+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this variant is 32004 bytes
23+ |
24+ note: and the second-largest variant is 8 bytes:
25+ --> $DIR/large_enum_variant.rs:30:5
1826 |
27+ LL | VariantOk(i32, u32),
28+ | ^^^^^^^^^^^^^^^^^^^
1929help: consider boxing the large fields to reduce the total size of the enum
2030 |
2131LL | ContainingLargeEnum(Box<LargeEnum>),
@@ -25,8 +35,13 @@ error: large size difference between variants
2535 --> $DIR/large_enum_variant.rs:41:5
2636 |
2737LL | StructLikeLarge { x: [i32; 8000], y: i32 },
28- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
38+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this variant is 32004 bytes
2939 |
40+ note: and the second-largest variant is 8 bytes:
41+ --> $DIR/large_enum_variant.rs:40:5
42+ |
43+ LL | VariantOk(i32, u32),
44+ | ^^^^^^^^^^^^^^^^^^^
3045help: consider boxing the large fields to reduce the total size of the enum
3146 --> $DIR/large_enum_variant.rs:41:5
3247 |
@@ -37,8 +52,13 @@ error: large size difference between variants
3752 --> $DIR/large_enum_variant.rs:46:5
3853 |
3954LL | StructLikeLarge2 { x: [i32; 8000] },
40- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
55+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this variant is 32000 bytes
56+ |
57+ note: and the second-largest variant is 8 bytes:
58+ --> $DIR/large_enum_variant.rs:45:5
4159 |
60+ LL | VariantOk(i32, u32),
61+ | ^^^^^^^^^^^^^^^^^^^
4262help: consider boxing the large fields to reduce the total size of the enum
4363 |
4464LL | StructLikeLarge2 { x: Box<[i32; 8000]> },
0 commit comments