@@ -276,5 +276,69 @@ help: consider boxing the large fields to reduce the total size of the enum
276276LL | Error(Box<PossiblyLargeEnumWithConst<256>>),
277277 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
278278
279- error: aborting due to 16 previous errors
279+ error: large size difference between variants
280+ --> tests/ui/large_enum_variant.rs:158:1
281+ |
282+ LL | / enum WithRecursion {
283+ LL | | Large([u64; 64]),
284+ | | ---------------- the largest variant contains at least 512 bytes
285+ LL | | Recursive(Box<WithRecursion>),
286+ | | ----------------------------- the second-largest variant contains at least 8 bytes
287+ LL | | }
288+ | |_^ the entire enum is at least 520 bytes
289+ |
290+ help: consider boxing the large fields to reduce the total size of the enum
291+ |
292+ LL | Large(Box<[u64; 64]>),
293+ | ~~~~~~~~~~~~~~
294+
295+ error: large size difference between variants
296+ --> tests/ui/large_enum_variant.rs:168:1
297+ |
298+ LL | / enum LargeEnumWithGenericsAndRecursive {
299+ LL | | Ok(),
300+ | | ---- the second-largest variant carries no data at all
301+ LL | | Error(WithRecursionAndGenerics<u64>),
302+ | | ------------------------------------ the largest variant contains at least 520 bytes
303+ LL | | }
304+ | |_^ the entire enum is at least 520 bytes
305+ |
306+ help: consider boxing the large fields to reduce the total size of the enum
307+ |
308+ LL | Error(Box<WithRecursionAndGenerics<u64>>),
309+ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
310+
311+ error: large size difference between variants
312+ --> tests/ui/large_enum_variant.rs:203:5
313+ |
314+ LL | / enum NoWarnings {
315+ LL | | BigBoi(PublishWithBytes),
316+ | | ------------------------ the largest variant contains at least 296 bytes
317+ LL | | _SmallBoi(u8),
318+ | | ------------- the second-largest variant contains at least 1 bytes
319+ LL | | }
320+ | |_____^ the entire enum is at least 296 bytes
321+ |
322+ help: consider boxing the large fields to reduce the total size of the enum
323+ |
324+ LL | BigBoi(Box<PublishWithBytes>),
325+ | ~~~~~~~~~~~~~~~~~~~~~
326+
327+ error: large size difference between variants
328+ --> tests/ui/large_enum_variant.rs:208:5
329+ |
330+ LL | / enum MakesClippyAngry {
331+ LL | | BigBoi(PublishWithVec),
332+ | | ---------------------- the largest variant contains at least 224 bytes
333+ LL | | _SmallBoi(u8),
334+ | | ------------- the second-largest variant contains at least 1 bytes
335+ LL | | }
336+ | |_____^ the entire enum is at least 224 bytes
337+ |
338+ help: consider boxing the large fields to reduce the total size of the enum
339+ |
340+ LL | BigBoi(Box<PublishWithVec>),
341+ | ~~~~~~~~~~~~~~~~~~~
342+
343+ error: aborting due to 20 previous errors
280344
0 commit comments