5 #![allow(unused_variables)]
6 #![deny(large_enum_variant)]
10 B([i32; 8000]), //~ ERROR large size difference between variants
11 //~^ HELP consider boxing the large fields to reduce the total size of the enum
12 //~| SUGGESTION Box<[i32; 8000]>
15 enum GenericEnumOk<T> {
20 enum GenericEnum2<T> {
23 C(T, [i32; 8000]), //~ ERROR large size difference between variants
24 //~^ HELP consider boxing the large fields to reduce the total size of the enum
31 enum LargeEnumGeneric<A: SomeTrait> {
32 Var(A::Item), // regression test, this used to ICE
37 ContainingLargeEnum(LargeEnum), //~ ERROR large size difference between variants
38 //~^ HELP consider boxing the large fields to reduce the total size of the enum
39 //~| SUGGESTION Box<LargeEnum>
42 ContainingMoreThanOneField(i32, [i32; 8000], [i32; 9500]), //~ ERROR large size difference between variants
43 //~^ HELP consider boxing the large fields to reduce the total size of the enum
45 StructLikeLittle { x: i32, y: i32 },
50 StructLikeLarge { x: [i32; 8000], y: i32 }, //~ ERROR large size difference between variants
51 //~^ HELP consider boxing the large fields to reduce the total size of the enum
56 StructLikeLarge2 { //~ ERROR large size difference between variants
58 [i32; 8000] //~ SUGGESTION Box<[i32; 8000]>
59 //~^ HELP consider boxing the large fields to reduce the total size of the enum