@@ -283,14 +283,62 @@ LL | / enum WithRecursion {
283283LL | | Large([u64; 64]),
284284 | | ---------------- the largest variant contains at least 512 bytes
285285LL | | Recursive(Box<WithRecursion>),
286- | | ----------------------------- the second-largest variant contains at least 0 bytes
286+ | | ----------------------------- the second-largest variant contains at least 8 bytes
287287LL | | }
288- | |_^ the entire enum is at least 0 bytes
288+ | |_^ the entire enum is at least 520 bytes
289289 |
290290help: consider boxing the large fields to reduce the total size of the enum
291291 |
292292LL | Large(Box<[u64; 64]>),
293293 | ~~~~~~~~~~~~~~
294294
295- error: aborting due to 17 previous errors
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
296344
0 commit comments