fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #71868 - Mark-Simulacrum:stable-1.43.1, r=pietroalbini8d69840ab92

1.43.1
4.0 KiB112 linesraw
1error[E0493]: destructors cannot be evaluated at compile-time
2  --> $DIR/check-static-values-constraints.rs:65:43
3   |
4LL |                                           ..SafeStruct{field1: SafeEnum::Variant3(WithDtor),
5   |  ___________________________________________^
6LL | |
7LL | |                                                      field2: SafeEnum::Variant1}};
8   | |________________________________________________________________________________^ statics cannot evaluate destructors
9
10error[E0010]: allocations are not allowed in statics
11  --> $DIR/check-static-values-constraints.rs:79:33
12   |
13LL | static STATIC11: Box<MyOwned> = box MyOwned;
14   |                                 ^^^^^^^^^^^ allocation not allowed in statics
15
16error[E0019]: static contains unimplemented expression type
17  --> $DIR/check-static-values-constraints.rs:79:37
18   |
19LL | static STATIC11: Box<MyOwned> = box MyOwned;
20   |                                     ^^^^^^^
21
22error[E0015]: calls in statics are limited to constant functions, tuple structs and tuple variants
23  --> $DIR/check-static-values-constraints.rs:90:32
24   |
25LL |     field2: SafeEnum::Variant4("str".to_string())
26   |                                ^^^^^^^^^^^^^^^^^
27
28error[E0010]: allocations are not allowed in statics
29  --> $DIR/check-static-values-constraints.rs:95:5
30   |
31LL |     box MyOwned,
32   |     ^^^^^^^^^^^ allocation not allowed in statics
33
34error[E0019]: static contains unimplemented expression type
35  --> $DIR/check-static-values-constraints.rs:95:9
36   |
37LL |     box MyOwned,
38   |         ^^^^^^^
39
40error[E0010]: allocations are not allowed in statics
41  --> $DIR/check-static-values-constraints.rs:97:5
42   |
43LL |     box MyOwned,
44   |     ^^^^^^^^^^^ allocation not allowed in statics
45
46error[E0019]: static contains unimplemented expression type
47  --> $DIR/check-static-values-constraints.rs:97:9
48   |
49LL |     box MyOwned,
50   |         ^^^^^^^
51
52error[E0010]: allocations are not allowed in statics
53  --> $DIR/check-static-values-constraints.rs:102:6
54   |
55LL |     &box MyOwned,
56   |      ^^^^^^^^^^^ allocation not allowed in statics
57
58error[E0019]: static contains unimplemented expression type
59  --> $DIR/check-static-values-constraints.rs:102:10
60   |
61LL |     &box MyOwned,
62   |          ^^^^^^^
63
64error[E0010]: allocations are not allowed in statics
65  --> $DIR/check-static-values-constraints.rs:104:6
66   |
67LL |     &box MyOwned,
68   |      ^^^^^^^^^^^ allocation not allowed in statics
69
70error[E0019]: static contains unimplemented expression type
71  --> $DIR/check-static-values-constraints.rs:104:10
72   |
73LL |     &box MyOwned,
74   |          ^^^^^^^
75
76error[E0010]: allocations are not allowed in statics
77  --> $DIR/check-static-values-constraints.rs:111:5
78   |
79LL |     box 3;
80   |     ^^^^^ allocation not allowed in statics
81
82error[E0019]: static contains unimplemented expression type
83  --> $DIR/check-static-values-constraints.rs:111:9
84   |
85LL |     box 3;
86   |         ^
87
88error[E0507]: cannot move out of static item `x`
89  --> $DIR/check-static-values-constraints.rs:116:45
90   |
91LL |     let y = { static x: Box<isize> = box 3; x };
92   |                                             ^
93   |                                             |
94   |                                             move occurs because `x` has type `std::boxed::Box<isize>`, which does not implement the `Copy` trait
95   |                                             help: consider borrowing here: `&x`
96
97error[E0010]: allocations are not allowed in statics
98  --> $DIR/check-static-values-constraints.rs:116:38
99   |
100LL |     let y = { static x: Box<isize> = box 3; x };
101   |                                      ^^^^^ allocation not allowed in statics
102
103error[E0019]: static contains unimplemented expression type
104  --> $DIR/check-static-values-constraints.rs:116:42
105   |
106LL |     let y = { static x: Box<isize> = box 3; x };
107   |                                          ^
108
109error: aborting due to 17 previous errors
110
111Some errors have detailed explanations: E0010, E0015, E0019, E0493, E0507.
112For more information about an error, try `rustc --explain E0010`.