@@ -13,44 +13,80 @@ error[E0010]: allocations are not allowed in statics
13
13
LL | static STATIC11: Box<MyOwned> = box MyOwned;
14
14
| ^^^^^^^^^^^ allocation not allowed in statics
15
15
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
+
16
22
error[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
18
24
|
19
25
LL | field2: SafeEnum::Variant4("str".to_string())
20
26
| ^^^^^^^^^^^^^^^^^
21
27
22
28
error[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
24
30
|
25
31
LL | box MyOwned, //~ ERROR allocations are not allowed in statics
26
32
| ^^^^^^^^^^^ allocation not allowed in statics
27
33
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
+
28
40
error[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
30
42
|
31
43
LL | box MyOwned, //~ ERROR allocations are not allowed in statics
32
44
| ^^^^^^^^^^^ allocation not allowed in statics
33
45
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
+
34
52
error[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
36
54
|
37
55
LL | &box MyOwned, //~ ERROR allocations are not allowed in statics
38
56
| ^^^^^^^^^^^ allocation not allowed in statics
39
57
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
+
40
64
error[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
42
66
|
43
67
LL | &box MyOwned, //~ ERROR allocations are not allowed in statics
44
68
| ^^^^^^^^^^^ allocation not allowed in statics
45
69
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
+
46
76
error[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
48
78
|
49
79
LL | box 3;
50
80
| ^^^^^ allocation not allowed in statics
51
81
82
+ error[E0019]: static contains unimplemented expression type
83
+ --> $DIR/check-static-values-constraints.rs:111:9
84
+ |
85
+ LL | box 3;
86
+ | ^
87
+
52
88
error[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
54
90
|
55
91
LL | let y = { static x: Box<isize> = box 3; x };
56
92
| ^
@@ -59,12 +95,18 @@ LL | let y = { static x: Box<isize> = box 3; x };
59
95
| help: consider borrowing here: `&x`
60
96
61
97
error[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
63
99
|
64
100
LL | let y = { static x: Box<isize> = box 3; x };
65
101
| ^^^^^ allocation not allowed in statics
66
102
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
68
110
69
- Some errors occurred: E0010, E0015, E0493, E0507.
111
+ Some errors occurred: E0010, E0015, E0019, E0493, E0507.
70
112
For more information about an error, try `rustc --explain E0010`.
0 commit comments