]> git.lizzy.rs Git - rust.git/blob - src/test/ui/check-static-values-constraints.nll.stderr
Rollup merge of #57107 - mjbshaw:thread_local_test, r=nikomatsakis
[rust.git] / src / test / ui / check-static-values-constraints.nll.stderr
1 error[E0493]: destructors cannot be evaluated at compile-time
2   --> $DIR/check-static-values-constraints.rs:65:43
3    |
4 LL |                                           ..SafeStruct{field1: SafeEnum::Variant3(WithDtor),
5    |  ___________________________________________^
6 LL | | //~^ ERROR destructors cannot be evaluated at compile-time
7 LL | |                                                      field2: SafeEnum::Variant1}};
8    | |________________________________________________________________________________^ statics cannot evaluate destructors
9
10 error[E0010]: allocations are not allowed in statics
11   --> $DIR/check-static-values-constraints.rs:79:33
12    |
13 LL | static STATIC11: Box<MyOwned> = box MyOwned;
14    |                                 ^^^^^^^^^^^ allocation not allowed in statics
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
22 error[E0015]: calls in statics are limited to constant functions, tuple structs and tuple variants
23   --> $DIR/check-static-values-constraints.rs:90:32
24    |
25 LL |     field2: SafeEnum::Variant4("str".to_string())
26    |                                ^^^^^^^^^^^^^^^^^
27
28 error[E0010]: allocations are not allowed in statics
29   --> $DIR/check-static-values-constraints.rs:95:5
30    |
31 LL |     box MyOwned, //~ ERROR allocations are not allowed in statics
32    |     ^^^^^^^^^^^ allocation not allowed in statics
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
40 error[E0010]: allocations are not allowed in statics
41   --> $DIR/check-static-values-constraints.rs:97:5
42    |
43 LL |     box MyOwned, //~ ERROR allocations are not allowed in statics
44    |     ^^^^^^^^^^^ allocation not allowed in statics
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
52 error[E0010]: allocations are not allowed in statics
53   --> $DIR/check-static-values-constraints.rs:102:6
54    |
55 LL |     &box MyOwned, //~ ERROR allocations are not allowed in statics
56    |      ^^^^^^^^^^^ allocation not allowed in statics
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
64 error[E0010]: allocations are not allowed in statics
65   --> $DIR/check-static-values-constraints.rs:104:6
66    |
67 LL |     &box MyOwned, //~ ERROR allocations are not allowed in statics
68    |      ^^^^^^^^^^^ allocation not allowed in statics
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
76 error[E0010]: allocations are not allowed in statics
77   --> $DIR/check-static-values-constraints.rs:111:5
78    |
79 LL |     box 3;
80    |     ^^^^^ allocation not allowed in statics
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
88 error[E0507]: cannot move out of static item
89   --> $DIR/check-static-values-constraints.rs:116:45
90    |
91 LL |     let y = { static x: Box<isize> = box 3; x };
92    |                                             ^
93    |                                             |
94    |                                             cannot move out of static item
95    |                                             help: consider borrowing here: `&x`
96
97 error[E0010]: allocations are not allowed in statics
98   --> $DIR/check-static-values-constraints.rs:116:38
99    |
100 LL |     let y = { static x: Box<isize> = box 3; x };
101    |                                      ^^^^^ allocation not allowed in statics
102
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
110
111 Some errors occurred: E0010, E0015, E0019, E0493, E0507.
112 For more information about an error, try `rustc --explain E0010`.