]> git.lizzy.rs Git - rust.git/blob - src/test/ui/check-static-values-constraints.nll.stderr
MetadataOnlyCodegenBackend: remove `is_inline` call
[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[E0015]: calls in statics are limited to constant functions, tuple structs and tuple variants
17   --> $DIR/check-static-values-constraints.rs:89: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:94: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:95: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:99: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:100: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:106: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:110:45
54    |
55 LL |     let y = { static x: Box<isize> = box 3; x };
56    |                                             ^
57    |                                             |
58    |                                             cannot move out of static item
59    |                                             help: consider borrowing here: `&x`
60
61 error[E0010]: allocations are not allowed in statics
62   --> $DIR/check-static-values-constraints.rs:110:38
63    |
64 LL |     let y = { static x: Box<isize> = box 3; x };
65    |                                      ^^^^^ allocation not allowed in statics
66
67 error: aborting due to 10 previous errors
68
69 Some errors occurred: E0010, E0015, E0493, E0507.
70 For more information about an error, try `rustc --explain E0010`.