@@ -13,44 +13,80 @@ error[E0010]: allocations are not allowed in statics
1313LL | static STATIC11: Box<MyOwned> = box MyOwned;
1414 | ^^^^^^^^^^^ allocation not allowed in statics
1515
16+ error[E0019]: static contains unimplemented expression type
17+ --> $DIR/check-static-values-constraints.rs:79:37
18+ |
19+ LL | static STATIC11: Box<MyOwned> = box MyOwned;
20+ | ^^^^^^^
21+
1622error[E0015]: calls in statics are limited to constant functions, tuple structs and tuple variants
17- --> $DIR/check-static-values-constraints.rs:89 :32
23+ --> $DIR/check-static-values-constraints.rs:90 :32
1824 |
1925LL | field2: SafeEnum::Variant4("str".to_string())
2026 | ^^^^^^^^^^^^^^^^^
2127
2228error[E0010]: allocations are not allowed in statics
23- --> $DIR/check-static-values-constraints.rs:94 :5
29+ --> $DIR/check-static-values-constraints.rs:95 :5
2430 |
2531LL | box MyOwned, //~ ERROR allocations are not allowed in statics
2632 | ^^^^^^^^^^^ allocation not allowed in statics
2733
34+ error[E0019]: static contains unimplemented expression type
35+ --> $DIR/check-static-values-constraints.rs:95:9
36+ |
37+ LL | box MyOwned, //~ ERROR allocations are not allowed in statics
38+ | ^^^^^^^
39+
2840error[E0010]: allocations are not allowed in statics
29- --> $DIR/check-static-values-constraints.rs:95 :5
41+ --> $DIR/check-static-values-constraints.rs:97 :5
3042 |
3143LL | box MyOwned, //~ ERROR allocations are not allowed in statics
3244 | ^^^^^^^^^^^ allocation not allowed in statics
3345
46+ error[E0019]: static contains unimplemented expression type
47+ --> $DIR/check-static-values-constraints.rs:97:9
48+ |
49+ LL | box MyOwned, //~ ERROR allocations are not allowed in statics
50+ | ^^^^^^^
51+
3452error[E0010]: allocations are not allowed in statics
35- --> $DIR/check-static-values-constraints.rs:99 :6
53+ --> $DIR/check-static-values-constraints.rs:102 :6
3654 |
3755LL | &box MyOwned, //~ ERROR allocations are not allowed in statics
3856 | ^^^^^^^^^^^ allocation not allowed in statics
3957
58+ error[E0019]: static contains unimplemented expression type
59+ --> $DIR/check-static-values-constraints.rs:102:10
60+ |
61+ LL | &box MyOwned, //~ ERROR allocations are not allowed in statics
62+ | ^^^^^^^
63+
4064error[E0010]: allocations are not allowed in statics
41- --> $DIR/check-static-values-constraints.rs:100 :6
65+ --> $DIR/check-static-values-constraints.rs:104 :6
4266 |
4367LL | &box MyOwned, //~ ERROR allocations are not allowed in statics
4468 | ^^^^^^^^^^^ allocation not allowed in statics
4569
70+ error[E0019]: static contains unimplemented expression type
71+ --> $DIR/check-static-values-constraints.rs:104:10
72+ |
73+ LL | &box MyOwned, //~ ERROR allocations are not allowed in statics
74+ | ^^^^^^^
75+
4676error[E0010]: allocations are not allowed in statics
47- --> $DIR/check-static-values-constraints.rs:106 :5
77+ --> $DIR/check-static-values-constraints.rs:111 :5
4878 |
4979LL | box 3;
5080 | ^^^^^ allocation not allowed in statics
5181
82+ error[E0019]: static contains unimplemented expression type
83+ --> $DIR/check-static-values-constraints.rs:111:9
84+ |
85+ LL | box 3;
86+ | ^
87+
5288error[E0507]: cannot move out of static item
53- --> $DIR/check-static-values-constraints.rs:110 :45
89+ --> $DIR/check-static-values-constraints.rs:116 :45
5490 |
5591LL | let y = { static x: Box<isize> = box 3; x };
5692 | ^
@@ -59,12 +95,18 @@ LL | let y = { static x: Box<isize> = box 3; x };
5995 | help: consider borrowing here: `&x`
6096
6197error[E0010]: allocations are not allowed in statics
62- --> $DIR/check-static-values-constraints.rs:110 :38
98+ --> $DIR/check-static-values-constraints.rs:116 :38
6399 |
64100LL | let y = { static x: Box<isize> = box 3; x };
65101 | ^^^^^ allocation not allowed in statics
66102
67- error: aborting due to 10 previous errors
103+ error[E0019]: static contains unimplemented expression type
104+ --> $DIR/check-static-values-constraints.rs:116:42
105+ |
106+ LL | let y = { static x: Box<isize> = box 3; x };
107+ | ^
108+
109+ error: aborting due to 17 previous errors
68110
69- Some errors occurred: E0010, E0015, E0493, E0507.
111+ Some errors occurred: E0010, E0015, E0019, E0493, E0507.
70112For more information about an error, try `rustc --explain E0010`.
0 commit comments