2018-08-08 07:28:26 -05:00
|
|
|
error[E0493]: destructors cannot be evaluated at compile-time
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/check-static-values-constraints.rs:65:43
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | ..SafeStruct{field1: SafeEnum::Variant3(WithDtor),
|
|
|
|
| ___________________________________________^
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | |
|
2018-08-08 07:28:26 -05:00
|
|
|
LL | | field2: SafeEnum::Variant1}};
|
2020-06-20 15:38:57 -05:00
|
|
|
| | ^- value is dropped here
|
|
|
|
| |________________________________________________________________________________|
|
|
|
|
| statics cannot evaluate destructors
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
error[E0010]: allocations are not allowed in statics
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/check-static-values-constraints.rs:79:33
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | static STATIC11: Box<MyOwned> = box MyOwned;
|
|
|
|
| ^^^^^^^^^^^ allocation not allowed in statics
|
|
|
|
|
2018-12-28 13:05:22 -06:00
|
|
|
error[E0019]: static contains unimplemented expression type
|
|
|
|
--> $DIR/check-static-values-constraints.rs:79:37
|
|
|
|
|
|
|
|
|
LL | static STATIC11: Box<MyOwned> = box MyOwned;
|
|
|
|
| ^^^^^^^
|
2020-05-04 16:33:10 -05:00
|
|
|
|
|
|
|
|
= help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
|
2018-12-28 13:05:22 -06:00
|
|
|
|
2018-08-08 07:28:26 -05:00
|
|
|
error[E0015]: calls in statics are limited to constant functions, tuple structs and tuple variants
|
2018-12-28 13:05:22 -06:00
|
|
|
--> $DIR/check-static-values-constraints.rs:90:32
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | field2: SafeEnum::Variant4("str".to_string())
|
|
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error[E0010]: allocations are not allowed in statics
|
2018-12-28 13:05:22 -06:00
|
|
|
--> $DIR/check-static-values-constraints.rs:95:5
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | box MyOwned,
|
2018-08-08 07:28:26 -05:00
|
|
|
| ^^^^^^^^^^^ allocation not allowed in statics
|
|
|
|
|
2018-12-28 13:05:22 -06:00
|
|
|
error[E0019]: static contains unimplemented expression type
|
|
|
|
--> $DIR/check-static-values-constraints.rs:95:9
|
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | box MyOwned,
|
2018-12-28 13:05:22 -06:00
|
|
|
| ^^^^^^^
|
2020-05-04 16:33:10 -05:00
|
|
|
|
|
|
|
|
= help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
|
2018-12-28 13:05:22 -06:00
|
|
|
|
2018-08-08 07:28:26 -05:00
|
|
|
error[E0010]: allocations are not allowed in statics
|
2018-12-28 13:05:22 -06:00
|
|
|
--> $DIR/check-static-values-constraints.rs:97:5
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | box MyOwned,
|
2018-08-08 07:28:26 -05:00
|
|
|
| ^^^^^^^^^^^ allocation not allowed in statics
|
|
|
|
|
2018-12-28 13:05:22 -06:00
|
|
|
error[E0019]: static contains unimplemented expression type
|
|
|
|
--> $DIR/check-static-values-constraints.rs:97:9
|
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | box MyOwned,
|
2018-12-28 13:05:22 -06:00
|
|
|
| ^^^^^^^
|
2020-05-04 16:33:10 -05:00
|
|
|
|
|
|
|
|
= help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
|
2018-12-28 13:05:22 -06:00
|
|
|
|
2018-08-08 07:28:26 -05:00
|
|
|
error[E0010]: allocations are not allowed in statics
|
2018-12-28 13:05:22 -06:00
|
|
|
--> $DIR/check-static-values-constraints.rs:102:6
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | &box MyOwned,
|
2018-08-08 07:28:26 -05:00
|
|
|
| ^^^^^^^^^^^ allocation not allowed in statics
|
|
|
|
|
2018-12-28 13:05:22 -06:00
|
|
|
error[E0019]: static contains unimplemented expression type
|
|
|
|
--> $DIR/check-static-values-constraints.rs:102:10
|
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | &box MyOwned,
|
2018-12-28 13:05:22 -06:00
|
|
|
| ^^^^^^^
|
2020-05-04 16:33:10 -05:00
|
|
|
|
|
|
|
|
= help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
|
2018-12-28 13:05:22 -06:00
|
|
|
|
2018-08-08 07:28:26 -05:00
|
|
|
error[E0010]: allocations are not allowed in statics
|
2018-12-28 13:05:22 -06:00
|
|
|
--> $DIR/check-static-values-constraints.rs:104:6
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | &box MyOwned,
|
2018-08-08 07:28:26 -05:00
|
|
|
| ^^^^^^^^^^^ allocation not allowed in statics
|
|
|
|
|
2018-12-28 13:05:22 -06:00
|
|
|
error[E0019]: static contains unimplemented expression type
|
|
|
|
--> $DIR/check-static-values-constraints.rs:104:10
|
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | &box MyOwned,
|
2018-12-28 13:05:22 -06:00
|
|
|
| ^^^^^^^
|
2020-05-04 16:33:10 -05:00
|
|
|
|
|
|
|
|
= help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
|
2018-12-28 13:05:22 -06:00
|
|
|
|
2018-08-08 07:28:26 -05:00
|
|
|
error[E0010]: allocations are not allowed in statics
|
2018-12-28 13:05:22 -06:00
|
|
|
--> $DIR/check-static-values-constraints.rs:111:5
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | box 3;
|
|
|
|
| ^^^^^ allocation not allowed in statics
|
|
|
|
|
2018-12-28 13:05:22 -06:00
|
|
|
error[E0019]: static contains unimplemented expression type
|
|
|
|
--> $DIR/check-static-values-constraints.rs:111:9
|
|
|
|
|
|
|
|
|
LL | box 3;
|
|
|
|
| ^
|
2020-05-04 16:33:10 -05:00
|
|
|
|
|
|
|
|
= help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
|
2018-12-28 13:05:22 -06:00
|
|
|
|
2019-05-05 06:02:32 -05:00
|
|
|
error[E0507]: cannot move out of static item `x`
|
2018-12-28 13:05:22 -06:00
|
|
|
--> $DIR/check-static-values-constraints.rs:116:45
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | let y = { static x: Box<isize> = box 3; x };
|
2019-04-22 02:40:08 -05:00
|
|
|
| ^
|
|
|
|
| |
|
2020-09-02 02:40:56 -05:00
|
|
|
| move occurs because `x` has type `Box<isize>`, which does not implement the `Copy` trait
|
2019-04-22 02:40:08 -05:00
|
|
|
| help: consider borrowing here: `&x`
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
error[E0010]: allocations are not allowed in statics
|
2018-12-28 13:05:22 -06:00
|
|
|
--> $DIR/check-static-values-constraints.rs:116:38
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | let y = { static x: Box<isize> = box 3; x };
|
|
|
|
| ^^^^^ allocation not allowed in statics
|
|
|
|
|
2018-12-28 13:05:22 -06:00
|
|
|
error[E0019]: static contains unimplemented expression type
|
|
|
|
--> $DIR/check-static-values-constraints.rs:116:42
|
|
|
|
|
|
|
|
|
LL | let y = { static x: Box<isize> = box 3; x };
|
|
|
|
| ^
|
2020-05-04 16:33:10 -05:00
|
|
|
|
|
|
|
|
= help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
|
2018-12-28 13:05:22 -06:00
|
|
|
|
|
|
|
error: aborting due to 17 previous errors
|
2018-08-08 07:28:26 -05:00
|
|
|
|
2019-09-12 08:52:51 -05:00
|
|
|
Some errors have detailed explanations: E0010, E0015, E0019, E0493, E0507.
|
2018-08-08 07:28:26 -05:00
|
|
|
For more information about an error, try `rustc --explain E0010`.
|