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]: calls in statics are limited to constant functions, tuple structs and tuple variants
19 --> $DIR/check-static-values-constraints.rs:89:32
21 LL | field2: SafeEnum::Variant4("str".to_string())
24 error[E0010]: allocations are not allowed in statics
25 --> $DIR/check-static-values-constraints.rs:94:5
28 | ^^^^^^^^^^^ allocation not allowed in statics
30 error[E0010]: allocations are not allowed in statics
31 --> $DIR/check-static-values-constraints.rs:95:5
34 | ^^^^^^^^^^^ allocation not allowed in statics
36 error[E0010]: allocations are not allowed in statics
37 --> $DIR/check-static-values-constraints.rs:99:6
40 | ^^^^^^^^^^^ allocation not allowed in statics
42 error[E0010]: allocations are not allowed in statics
43 --> $DIR/check-static-values-constraints.rs:100:6
46 | ^^^^^^^^^^^ allocation not allowed in statics
48 error[E0010]: allocations are not allowed in statics
49 --> $DIR/check-static-values-constraints.rs:106:5
52 | ^^^^^ allocation not allowed in statics
54 error[E0507]: cannot move out of static item `x`
55 --> $DIR/check-static-values-constraints.rs:110:45
57 LL | let y = { static x: Box<isize> = box 3; x };
60 | move occurs because `x` has type `Box<isize>`, which does not implement the `Copy` trait
61 | help: consider borrowing here: `&x`
63 error[E0010]: allocations are not allowed in statics
64 --> $DIR/check-static-values-constraints.rs:110:38
66 LL | let y = { static x: Box<isize> = box 3; x };
67 | ^^^^^ allocation not allowed in statics
69 error: aborting due to 10 previous errors
71 Some errors have detailed explanations: E0010, E0015, E0493, E0507.
72 For more information about an error, try `rustc --explain E0010`.