@@ -12,7 +12,7 @@ LL | | }
1212 |
1313 = note: `-D clippy::large-enum-variant` implied by `-D warnings`
1414 = help: to override `-D warnings` add `#[allow(clippy::large_enum_variant)]`
15- help: consider boxing the large fields to reduce the total size of the enum
15+ help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum
1616 |
1717LL - B([i32; 8000]),
1818LL + B(Box<[i32; 8000]>),
@@ -30,7 +30,7 @@ LL | | ContainingLargeEnum(LargeEnum),
3030LL | | }
3131 | |_^ the entire enum is at least 32004 bytes
3232 |
33- help: consider boxing the large fields to reduce the total size of the enum
33+ help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum
3434 |
3535LL - ContainingLargeEnum(LargeEnum),
3636LL + ContainingLargeEnum(Box<LargeEnum>),
@@ -49,7 +49,7 @@ LL | | StructLikeLittle { x: i32, y: i32 },
4949LL | | }
5050 | |_^ the entire enum is at least 70008 bytes
5151 |
52- help: consider boxing the large fields to reduce the total size of the enum
52+ help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum
5353 |
5454LL - ContainingMoreThanOneField(i32, [i32; 8000], [i32; 9500]),
5555LL + ContainingMoreThanOneField(i32, Box<[i32; 8000]>, Box<[i32; 9500]>),
@@ -67,7 +67,7 @@ LL | | StructLikeLarge { x: [i32; 8000], y: i32 },
6767LL | | }
6868 | |_^ the entire enum is at least 32008 bytes
6969 |
70- help: consider boxing the large fields to reduce the total size of the enum
70+ help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum
7171 |
7272LL - StructLikeLarge { x: [i32; 8000], y: i32 },
7373LL + StructLikeLarge { x: Box<[i32; 8000]>, y: i32 },
@@ -85,7 +85,7 @@ LL | | StructLikeLarge2 { x: [i32; 8000] },
8585LL | | }
8686 | |_^ the entire enum is at least 32004 bytes
8787 |
88- help: consider boxing the large fields to reduce the total size of the enum
88+ help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum
8989 |
9090LL - StructLikeLarge2 { x: [i32; 8000] },
9191LL + StructLikeLarge2 { x: Box<[i32; 8000]> },
@@ -104,7 +104,7 @@ LL | | C([u8; 200]),
104104LL | | }
105105 | |_^ the entire enum is at least 1256 bytes
106106 |
107- help: consider boxing the large fields to reduce the total size of the enum
107+ help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum
108108 |
109109LL - B([u8; 1255]),
110110LL + B(Box<[u8; 1255]>),
@@ -122,7 +122,7 @@ LL | | ContainingMoreThanOneField([i32; 8000], [i32; 2], [i32; 9500], [i32;
122122LL | | }
123123 | |_^ the entire enum is at least 70132 bytes
124124 |
125- help: consider boxing the large fields to reduce the total size of the enum
125+ help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum
126126 |
127127LL - ContainingMoreThanOneField([i32; 8000], [i32; 2], [i32; 9500], [i32; 30]),
128128LL + ContainingMoreThanOneField(Box<[i32; 8000]>, [i32; 2], Box<[i32; 9500]>, [i32; 30]),
@@ -140,7 +140,7 @@ LL | | B(Struct2),
140140LL | | }
141141 | |_^ the entire enum is at least 32004 bytes
142142 |
143- help: consider boxing the large fields to reduce the total size of the enum
143+ help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum
144144 |
145145LL - B(Struct2),
146146LL + B(Box<Struct2>),
@@ -158,7 +158,7 @@ LL | | B(Struct2),
158158LL | | }
159159 | |_^ the entire enum is at least 32000 bytes
160160 |
161- help: consider boxing the large fields to reduce the total size of the enum
161+ help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum
162162 |
163163LL - B(Struct2),
164164LL + B(Box<Struct2>),
@@ -176,7 +176,7 @@ LL | | B(Struct2),
176176LL | | }
177177 | |_^ the entire enum is at least 32000 bytes
178178 |
179- help: consider boxing the large fields to reduce the total size of the enum
179+ help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum
180180 |
181181LL - B(Struct2),
182182LL + B(Box<Struct2>),
@@ -199,7 +199,7 @@ note: boxing a variant would require the type no longer be `Copy`
199199 |
200200LL | enum CopyableLargeEnum {
201201 | ^^^^^^^^^^^^^^^^^
202- help: consider boxing the large fields to reduce the total size of the enum
202+ help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum
203203 --> tests/ui/large_enum_variant.rs:118:5
204204 |
205205LL | B([u64; 8000]),
@@ -222,7 +222,7 @@ note: boxing a variant would require the type no longer be `Copy`
222222 |
223223LL | enum ManuallyCopyLargeEnum {
224224 | ^^^^^^^^^^^^^^^^^^^^^
225- help: consider boxing the large fields to reduce the total size of the enum
225+ help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum
226226 --> tests/ui/large_enum_variant.rs:124:5
227227 |
228228LL | B([u64; 8000]),
@@ -245,7 +245,7 @@ note: boxing a variant would require the type no longer be `Copy`
245245 |
246246LL | enum SomeGenericPossiblyCopyEnum<T> {
247247 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
248- help: consider boxing the large fields to reduce the total size of the enum
248+ help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum
249249 --> tests/ui/large_enum_variant.rs:138:5
250250 |
251251LL | B([u64; 4000]),
@@ -263,7 +263,7 @@ LL | | Large((T, [u8; 512])),
263263LL | | }
264264 | |_^ the entire enum is at least 512 bytes
265265 |
266- help: consider boxing the large fields to reduce the total size of the enum
266+ help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum
267267 |
268268LL - Large((T, [u8; 512])),
269269LL + Large(Box<(T, [u8; 512])>),
@@ -281,7 +281,7 @@ LL | | Small(u8),
281281LL | | }
282282 | |_^ the entire enum is at least 520 bytes
283283 |
284- help: consider boxing the large fields to reduce the total size of the enum
284+ help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum
285285 |
286286LL - Large([Foo<u64>; 64]),
287287LL + Large(Box<[Foo<u64>; 64]>),
@@ -299,7 +299,7 @@ LL | | Error(PossiblyLargeEnumWithConst<256>),
299299LL | | }
300300 | |_^ the entire enum is at least 514 bytes
301301 |
302- help: consider boxing the large fields to reduce the total size of the enum
302+ help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum
303303 |
304304LL - Error(PossiblyLargeEnumWithConst<256>),
305305LL + Error(Box<PossiblyLargeEnumWithConst<256>>),
@@ -317,7 +317,7 @@ LL | | Recursive(Box<WithRecursion>),
317317LL | | }
318318 | |_^ the entire enum is at least 520 bytes
319319 |
320- help: consider boxing the large fields to reduce the total size of the enum
320+ help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum
321321 |
322322LL - Large([u64; 64]),
323323LL + Large(Box<[u64; 64]>),
@@ -335,7 +335,7 @@ LL | | Error(WithRecursionAndGenerics<u64>),
335335LL | | }
336336 | |_^ the entire enum is at least 520 bytes
337337 |
338- help: consider boxing the large fields to reduce the total size of the enum
338+ help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum
339339 |
340340LL - Error(WithRecursionAndGenerics<u64>),
341341LL + Error(Box<WithRecursionAndGenerics<u64>>),
@@ -353,7 +353,7 @@ LL | | _SmallBoi(u8),
353353LL | | }
354354 | |_____^ the entire enum is at least 296 bytes
355355 |
356- help: consider boxing the large fields to reduce the total size of the enum
356+ help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum
357357 |
358358LL - BigBoi(PublishWithBytes),
359359LL + BigBoi(Box<PublishWithBytes>),
@@ -371,7 +371,7 @@ LL | | _SmallBoi(u8),
371371LL | | }
372372 | |_____^ the entire enum is at least 224 bytes
373373 |
374- help: consider boxing the large fields to reduce the total size of the enum
374+ help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum
375375 |
376376LL - BigBoi(PublishWithVec),
377377LL + BigBoi(Box<PublishWithVec>),
0 commit comments