summary refs log tree commit diff
path: root/src/test/ui/check-static-values-constraints.stderr
blob: ac979a3fa7cfcebf711441bee02b65bf6ab6e0e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
error[E0493]: destructors cannot be evaluated at compile-time
  --> $DIR/check-static-values-constraints.rs:75:43
   |
LL |                                           ..SafeStruct{field1: SafeEnum::Variant3(WithDtor),
   |  ___________________________________________^
LL | | //~^ ERROR destructors cannot be evaluated at compile-time
LL | |                                                      field2: SafeEnum::Variant1}};
   | |________________________________________________________________________________^ statics cannot evaluate destructors

error[E0010]: allocations are not allowed in statics
  --> $DIR/check-static-values-constraints.rs:89:33
   |
LL | static STATIC11: Box<MyOwned> = box MyOwned;
   |                                 ^^^^^^^^^^^ allocation not allowed in statics

error[E0015]: calls in statics are limited to constant functions, tuple structs and tuple variants
  --> $DIR/check-static-values-constraints.rs:99:32
   |
LL |     field2: SafeEnum::Variant4("str".to_string())
   |                                ^^^^^^^^^^^^^^^^^

error[E0010]: allocations are not allowed in statics
  --> $DIR/check-static-values-constraints.rs:104:5
   |
LL |     box MyOwned, //~ ERROR allocations are not allowed in statics
   |     ^^^^^^^^^^^ allocation not allowed in statics

error[E0010]: allocations are not allowed in statics
  --> $DIR/check-static-values-constraints.rs:105:5
   |
LL |     box MyOwned, //~ ERROR allocations are not allowed in statics
   |     ^^^^^^^^^^^ allocation not allowed in statics

error[E0010]: allocations are not allowed in statics
  --> $DIR/check-static-values-constraints.rs:109:6
   |
LL |     &box MyOwned, //~ ERROR allocations are not allowed in statics
   |      ^^^^^^^^^^^ allocation not allowed in statics

error[E0010]: allocations are not allowed in statics
  --> $DIR/check-static-values-constraints.rs:110:6
   |
LL |     &box MyOwned, //~ ERROR allocations are not allowed in statics
   |      ^^^^^^^^^^^ allocation not allowed in statics

error[E0010]: allocations are not allowed in statics
  --> $DIR/check-static-values-constraints.rs:116:5
   |
LL |     box 3;
   |     ^^^^^ allocation not allowed in statics

error[E0507]: cannot move out of static item
  --> $DIR/check-static-values-constraints.rs:120:45
   |
LL |     let y = { static x: Box<isize> = box 3; x };
   |                                             ^ cannot move out of static item

error[E0010]: allocations are not allowed in statics
  --> $DIR/check-static-values-constraints.rs:120:38
   |
LL |     let y = { static x: Box<isize> = box 3; x };
   |                                      ^^^^^ allocation not allowed in statics

error: aborting due to 10 previous errors

Some errors occurred: E0010, E0015, E0493, E0507.
For more information about an error, try `rustc --explain E0010`.