@@ -2,9 +2,14 @@ error: large size difference between variants
2
2
--> $DIR/large_enum_variant.rs:7:5
3
3
|
4
4
LL | B([i32; 8000]),
5
- | ^^^^^^^^^^^^^^
5
+ | ^^^^^^^^^^^^^^ this variant is 32000 bytes
6
6
|
7
7
= 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
+ | ^^^^^^
8
13
help: consider boxing the large fields to reduce the total size of the enum
9
14
|
10
15
LL | B(Box<[i32; 8000]>),
@@ -14,8 +19,13 @@ error: large size difference between variants
14
19
--> $DIR/large_enum_variant.rs:31:5
15
20
|
16
21
LL | 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
18
26
|
27
+ LL | VariantOk(i32, u32),
28
+ | ^^^^^^^^^^^^^^^^^^^
19
29
help: consider boxing the large fields to reduce the total size of the enum
20
30
|
21
31
LL | ContainingLargeEnum(Box<LargeEnum>),
@@ -25,8 +35,13 @@ error: large size difference between variants
25
35
--> $DIR/large_enum_variant.rs:41:5
26
36
|
27
37
LL | StructLikeLarge { x: [i32; 8000], y: i32 },
28
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
38
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this variant is 32004 bytes
29
39
|
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
+ | ^^^^^^^^^^^^^^^^^^^
30
45
help: consider boxing the large fields to reduce the total size of the enum
31
46
--> $DIR/large_enum_variant.rs:41:5
32
47
|
@@ -37,8 +52,13 @@ error: large size difference between variants
37
52
--> $DIR/large_enum_variant.rs:46:5
38
53
|
39
54
LL | 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
41
59
|
60
+ LL | VariantOk(i32, u32),
61
+ | ^^^^^^^^^^^^^^^^^^^
42
62
help: consider boxing the large fields to reduce the total size of the enum
43
63
|
44
64
LL | StructLikeLarge2 { x: Box<[i32; 8000]> },
0 commit comments