]> git.lizzy.rs Git - rust.git/blob - src/test/ui/check-static-values-constraints.stderr
Rollup merge of #53317 - estebank:abolish-ice, r=oli-obk
[rust.git] / src / test / ui / check-static-values-constraints.stderr
1 error[E0493]: destructors cannot be evaluated at compile-time
2   --> $DIR/check-static-values-constraints.rs:75: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:89:33
12    |
13 LL | static STATIC11: Box<MyOwned> = box MyOwned;
14    |                                 ^^^^^^^^^^^ allocation not allowed in statics
15
16 error[E0015]: calls in statics are limited to constant functions, tuple structs and tuple variants
17   --> $DIR/check-static-values-constraints.rs:99:32
18    |
19 LL |     field2: SafeEnum::Variant4("str".to_string())
20    |                                ^^^^^^^^^^^^^^^^^
21
22 error[E0010]: allocations are not allowed in statics
23   --> $DIR/check-static-values-constraints.rs:104:5
24    |
25 LL |     box MyOwned, //~ ERROR allocations are not allowed in statics
26    |     ^^^^^^^^^^^ allocation not allowed in statics
27
28 error[E0010]: allocations are not allowed in statics
29   --> $DIR/check-static-values-constraints.rs:105:5
30    |
31 LL |     box MyOwned, //~ ERROR allocations are not allowed in statics
32    |     ^^^^^^^^^^^ allocation not allowed in statics
33
34 error[E0010]: allocations are not allowed in statics
35   --> $DIR/check-static-values-constraints.rs:109:6
36    |
37 LL |     &box MyOwned, //~ ERROR allocations are not allowed in statics
38    |      ^^^^^^^^^^^ allocation not allowed in statics
39
40 error[E0010]: allocations are not allowed in statics
41   --> $DIR/check-static-values-constraints.rs:110:6
42    |
43 LL |     &box MyOwned, //~ ERROR allocations are not allowed in statics
44    |      ^^^^^^^^^^^ allocation not allowed in statics
45
46 error[E0010]: allocations are not allowed in statics
47   --> $DIR/check-static-values-constraints.rs:116:5
48    |
49 LL |     box 3;
50    |     ^^^^^ allocation not allowed in statics
51
52 error[E0507]: cannot move out of static item
53   --> $DIR/check-static-values-constraints.rs:120:45
54    |
55 LL |     let y = { static x: Box<isize> = box 3; x };
56    |                                             ^ cannot move out of static item
57
58 error[E0010]: allocations are not allowed in statics
59   --> $DIR/check-static-values-constraints.rs:120:38
60    |
61 LL |     let y = { static x: Box<isize> = box 3; x };
62    |                                      ^^^^^ allocation not allowed in statics
63
64 error: aborting due to 10 previous errors
65
66 Some errors occurred: E0010, E0015, E0493, E0507.
67 For more information about an error, try `rustc --explain E0010`.