-error[E0493]: destructors cannot be evaluated at compile-time
+error[E0493]: destructor of `SafeStruct` cannot be evaluated at compile-time
--> $DIR/check-static-values-constraints.rs:65:43
|
LL | ..SafeStruct{field1: SafeEnum::Variant3(WithDtor),
LL | | field2: SafeEnum::Variant1}};
| | ^- value is dropped here
| |________________________________________________________________________________|
- | statics cannot evaluate destructors
+ | the destructor for this type cannot be evaluated in statics
error[E0010]: allocations are not allowed in statics
--> $DIR/check-static-values-constraints.rs:79:33
--> $DIR/check-static-values-constraints.rs:110:45
|
LL | let y = { static x: Box<isize> = box 3; x };
- | ^
- | |
- | move occurs because `x` has type `Box<isize>`, which does not implement the `Copy` trait
- | help: consider borrowing here: `&x`
+ | ^ move occurs because `x` has type `Box<isize>`, which does not implement the `Copy` trait
+ |
+help: consider borrowing here
+ |
+LL | let y = { static x: Box<isize> = box 3; &x };
+ | +
error[E0010]: allocations are not allowed in statics
--> $DIR/check-static-values-constraints.rs:110:38