1 error[E0493]: destructors cannot be evaluated at compile-time
2 --> $DIR/check-static-values-constraints.rs:65:43
4 LL | ..SafeStruct{field1: SafeEnum::Variant3(WithDtor),
5 | ___________________________________________^
7 LL | | field2: SafeEnum::Variant1}};
8 | | ^- value is dropped here
9 | |________________________________________________________________________________|
10 | statics cannot evaluate destructors
12 error[E0010]: allocations are not allowed in statics
13 --> $DIR/check-static-values-constraints.rs:79:33
15 LL | static STATIC11: Box<MyOwned> = box MyOwned;
16 | ^^^^^^^^^^^ allocation not allowed in statics
18 error[E0015]: cannot call non-const fn `<str as ToString>::to_string` in statics
19 --> $DIR/check-static-values-constraints.rs:89:38
21 LL | field2: SafeEnum::Variant4("str".to_string())
24 = note: calls in statics are limited to constant functions, tuple structs and tuple variants
26 error[E0010]: allocations are not allowed in statics
27 --> $DIR/check-static-values-constraints.rs:94:5
30 | ^^^^^^^^^^^ allocation not allowed in statics
32 error[E0010]: allocations are not allowed in statics
33 --> $DIR/check-static-values-constraints.rs:95:5
36 | ^^^^^^^^^^^ allocation not allowed in statics
38 error[E0010]: allocations are not allowed in statics
39 --> $DIR/check-static-values-constraints.rs:99:6
42 | ^^^^^^^^^^^ allocation not allowed in statics
44 error[E0010]: allocations are not allowed in statics
45 --> $DIR/check-static-values-constraints.rs:100:6
48 | ^^^^^^^^^^^ allocation not allowed in statics
50 error[E0010]: allocations are not allowed in statics
51 --> $DIR/check-static-values-constraints.rs:106:5
54 | ^^^^^ allocation not allowed in statics
56 error[E0507]: cannot move out of static item `x`
57 --> $DIR/check-static-values-constraints.rs:110:45
59 LL | let y = { static x: Box<isize> = box 3; x };
62 | move occurs because `x` has type `Box<isize>`, which does not implement the `Copy` trait
63 | help: consider borrowing here: `&x`
65 error[E0010]: allocations are not allowed in statics
66 --> $DIR/check-static-values-constraints.rs:110:38
68 LL | let y = { static x: Box<isize> = box 3; x };
69 | ^^^^^ allocation not allowed in statics
71 error: aborting due to 10 previous errors
73 Some errors have detailed explanations: E0010, E0015, E0493, E0507.
74 For more information about an error, try `rustc --explain E0010`.