]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/large_enum_variant.stderr
Rollup merge of #84221 - ABouttefeux:generic-arg-elision, r=estebank
[rust.git] / src / tools / clippy / 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:46:5
36    |
37 LL |     StructLikeLarge { x: [i32; 8000], y: i32 },
38    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this variant is 32004 bytes
39    |
40 note: and the second-largest variant is 8 bytes:
41   --> $DIR/large_enum_variant.rs:45:5
42    |
43 LL |     VariantOk(i32, u32),
44    |     ^^^^^^^^^^^^^^^^^^^
45 help: consider boxing the large fields to reduce the total size of the enum
46   --> $DIR/large_enum_variant.rs:46:5
47    |
48 LL |     StructLikeLarge { x: [i32; 8000], y: i32 },
49    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
50
51 error: large size difference between variants
52   --> $DIR/large_enum_variant.rs:51:5
53    |
54 LL |     StructLikeLarge2 { x: [i32; 8000] },
55    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this variant is 32000 bytes
56    |
57 note: and the second-largest variant is 8 bytes:
58   --> $DIR/large_enum_variant.rs:50:5
59    |
60 LL |     VariantOk(i32, u32),
61    |     ^^^^^^^^^^^^^^^^^^^
62 help: consider boxing the large fields to reduce the total size of the enum
63    |
64 LL |     StructLikeLarge2 { x: Box<[i32; 8000]> },
65    |                           ^^^^^^^^^^^^^^^^
66
67 error: aborting due to 4 previous errors
68