]> git.lizzy.rs Git - rust.git/blob - tests/ui/large_enum_variant.stderr
Rollup merge of #92849 - flip1995:clippyup, r=Manishearth
[rust.git] / tests / ui / large_enum_variant.stderr
1 error: large size difference between variants
2   --> $DIR/large_enum_variant.rs:12:5
3    |
4 LL |     B([i32; 8000]),
5    |     ^^^^^^^^^^^^^^ this variant is 32000 bytes
6    |
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:11:5
10    |
11 LL |     A(i32),
12    |     ^^^^^^
13 help: consider boxing the large fields to reduce the total size of the enum
14    |
15 LL |     B(Box<[i32; 8000]>),
16    |       ~~~~~~~~~~~~~~~~
17
18 error: large size difference between variants
19   --> $DIR/large_enum_variant.rs:36:5
20    |
21 LL |     ContainingLargeEnum(LargeEnum),
22    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this variant is 32004 bytes
23    |
24 note: and the second-largest variant is 8 bytes:
25   --> $DIR/large_enum_variant.rs:35:5
26    |
27 LL |     VariantOk(i32, u32),
28    |     ^^^^^^^^^^^^^^^^^^^
29 help: consider boxing the large fields to reduce the total size of the enum
30    |
31 LL |     ContainingLargeEnum(Box<LargeEnum>),
32    |                         ~~~~~~~~~~~~~~
33
34 error: large size difference between variants
35   --> $DIR/large_enum_variant.rs:40:5
36    |
37 LL |     ContainingMoreThanOneField(i32, [i32; 8000], [i32; 9500]),
38    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this variant is 70004 bytes
39    |
40 note: and the second-largest variant is 8 bytes:
41   --> $DIR/large_enum_variant.rs:42:5
42    |
43 LL |     StructLikeLittle { x: i32, y: i32 },
44    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
45 help: consider boxing the large fields to reduce the total size of the enum
46    |
47 LL |     ContainingMoreThanOneField(i32, Box<[i32; 8000]>, Box<[i32; 9500]>),
48    |                                     ~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~~~~
49
50 error: large size difference between variants
51   --> $DIR/large_enum_variant.rs:47:5
52    |
53 LL |     StructLikeLarge { x: [i32; 8000], y: i32 },
54    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this variant is 32004 bytes
55    |
56 note: and the second-largest variant is 8 bytes:
57   --> $DIR/large_enum_variant.rs:46:5
58    |
59 LL |     VariantOk(i32, u32),
60    |     ^^^^^^^^^^^^^^^^^^^
61 help: consider boxing the large fields to reduce the total size of the enum
62    |
63 LL |     StructLikeLarge { x: Box<[i32; 8000]>, y: i32 },
64    |                          ~~~~~~~~~~~~~~~~
65
66 error: large size difference between variants
67   --> $DIR/large_enum_variant.rs:52:5
68    |
69 LL |     StructLikeLarge2 { x: [i32; 8000] },
70    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this variant is 32000 bytes
71    |
72 note: and the second-largest variant is 8 bytes:
73   --> $DIR/large_enum_variant.rs:51:5
74    |
75 LL |     VariantOk(i32, u32),
76    |     ^^^^^^^^^^^^^^^^^^^
77 help: consider boxing the large fields to reduce the total size of the enum
78    |
79 LL |     StructLikeLarge2 { x: Box<[i32; 8000]> },
80    |                           ~~~~~~~~~~~~~~~~
81
82 error: large size difference between variants
83   --> $DIR/large_enum_variant.rs:68:5
84    |
85 LL |     B([u8; 1255]),
86    |     ^^^^^^^^^^^^^ this variant is 1255 bytes
87    |
88 note: and the second-largest variant is 200 bytes:
89   --> $DIR/large_enum_variant.rs:69:5
90    |
91 LL |     C([u8; 200]),
92    |     ^^^^^^^^^^^^
93 help: consider boxing the large fields to reduce the total size of the enum
94    |
95 LL |     B(Box<[u8; 1255]>),
96    |       ~~~~~~~~~~~~~~~
97
98 error: large size difference between variants
99   --> $DIR/large_enum_variant.rs:74:5
100    |
101 LL |     ContainingMoreThanOneField([i32; 8000], [i32; 2], [i32; 9500], [i32; 30]),
102    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this variant is 70128 bytes
103    |
104 note: and the second-largest variant is 8 bytes:
105   --> $DIR/large_enum_variant.rs:73:5
106    |
107 LL |     VariantOk(i32, u32),
108    |     ^^^^^^^^^^^^^^^^^^^
109 help: consider boxing the large fields to reduce the total size of the enum
110    |
111 LL |     ContainingMoreThanOneField(Box<[i32; 8000]>, [i32; 2], Box<[i32; 9500]>, [i32; 30]),
112    |                                ~~~~~~~~~~~~~~~~            ~~~~~~~~~~~~~~~~
113
114 error: aborting due to 7 previous errors
115