1
1
error: large size difference between variants
2
- --> $DIR/large_enum_variant.rs:7 :5
2
+ --> $DIR/large_enum_variant.rs:12 :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
8
note: and the second-largest variant is 4 bytes:
9
- --> $DIR/large_enum_variant.rs:6 :5
9
+ --> $DIR/large_enum_variant.rs:11 :5
10
10
|
11
11
LL | A(i32),
12
12
| ^^^^^^
@@ -16,13 +16,13 @@ LL | B(Box<[i32; 8000]>),
16
16
| ^^^^^^^^^^^^^^^^
17
17
18
18
error: large size difference between variants
19
- --> $DIR/large_enum_variant.rs:31 :5
19
+ --> $DIR/large_enum_variant.rs:36 :5
20
20
|
21
21
LL | ContainingLargeEnum(LargeEnum),
22
22
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this variant is 32004 bytes
23
23
|
24
24
note: and the second-largest variant is 8 bytes:
25
- --> $DIR/large_enum_variant.rs:30 :5
25
+ --> $DIR/large_enum_variant.rs:35 :5
26
26
|
27
27
LL | VariantOk(i32, u32),
28
28
| ^^^^^^^^^^^^^^^^^^^
@@ -32,30 +32,30 @@ LL | ContainingLargeEnum(Box<LargeEnum>),
32
32
| ^^^^^^^^^^^^^^
33
33
34
34
error: large size difference between variants
35
- --> $DIR/large_enum_variant.rs:41 :5
35
+ --> $DIR/large_enum_variant.rs:46 :5
36
36
|
37
37
LL | StructLikeLarge { x: [i32; 8000], y: i32 },
38
38
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this variant is 32004 bytes
39
39
|
40
40
note: and the second-largest variant is 8 bytes:
41
- --> $DIR/large_enum_variant.rs:40 :5
41
+ --> $DIR/large_enum_variant.rs:45 :5
42
42
|
43
43
LL | VariantOk(i32, u32),
44
44
| ^^^^^^^^^^^^^^^^^^^
45
45
help: consider boxing the large fields to reduce the total size of the enum
46
- --> $DIR/large_enum_variant.rs:41 :5
46
+ --> $DIR/large_enum_variant.rs:46 :5
47
47
|
48
48
LL | StructLikeLarge { x: [i32; 8000], y: i32 },
49
49
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
50
50
51
51
error: large size difference between variants
52
- --> $DIR/large_enum_variant.rs:46 :5
52
+ --> $DIR/large_enum_variant.rs:51 :5
53
53
|
54
54
LL | StructLikeLarge2 { x: [i32; 8000] },
55
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this variant is 32000 bytes
56
56
|
57
57
note: and the second-largest variant is 8 bytes:
58
- --> $DIR/large_enum_variant.rs:45 :5
58
+ --> $DIR/large_enum_variant.rs:50 :5
59
59
|
60
60
LL | VariantOk(i32, u32),
61
61
| ^^^^^^^^^^^^^^^^^^^
0 commit comments