]> git.proxmox.com Git - rustc.git/blame - src/test/ui/check-static-values-constraints.stderr
New upstream version 1.48.0~beta.8+dfsg1
[rustc.git] / src / test / ui / check-static-values-constraints.stderr
CommitLineData
b7449926 1error[E0493]: destructors cannot be evaluated at compile-time
0731742a 2 --> $DIR/check-static-values-constraints.rs:65:43
b7449926
XL
3 |
4LL | ..SafeStruct{field1: SafeEnum::Variant3(WithDtor),
5 | ___________________________________________^
532ac7d7 6LL | |
b7449926 7LL | | field2: SafeEnum::Variant1}};
f035d41b
XL
8 | | ^- value is dropped here
9 | |________________________________________________________________________________|
10 | statics cannot evaluate destructors
b7449926
XL
11
12error[E0010]: allocations are not allowed in statics
0731742a 13 --> $DIR/check-static-values-constraints.rs:79:33
b7449926
XL
14 |
15LL | static STATIC11: Box<MyOwned> = box MyOwned;
16 | ^^^^^^^^^^^ allocation not allowed in statics
17
18error[E0015]: calls in statics are limited to constant functions, tuple structs and tuple variants
1b1a35ee 19 --> $DIR/check-static-values-constraints.rs:89:32
b7449926
XL
20 |
21LL | field2: SafeEnum::Variant4("str".to_string())
22 | ^^^^^^^^^^^^^^^^^
23
24error[E0010]: allocations are not allowed in statics
1b1a35ee 25 --> $DIR/check-static-values-constraints.rs:94:5
b7449926 26 |
532ac7d7 27LL | box MyOwned,
b7449926
XL
28 | ^^^^^^^^^^^ allocation not allowed in statics
29
30error[E0010]: allocations are not allowed in statics
1b1a35ee 31 --> $DIR/check-static-values-constraints.rs:95:5
b7449926 32 |
532ac7d7 33LL | box MyOwned,
b7449926
XL
34 | ^^^^^^^^^^^ allocation not allowed in statics
35
36error[E0010]: allocations are not allowed in statics
1b1a35ee 37 --> $DIR/check-static-values-constraints.rs:99:6
b7449926 38 |
532ac7d7 39LL | &box MyOwned,
b7449926
XL
40 | ^^^^^^^^^^^ allocation not allowed in statics
41
42error[E0010]: allocations are not allowed in statics
1b1a35ee 43 --> $DIR/check-static-values-constraints.rs:100:6
b7449926 44 |
532ac7d7 45LL | &box MyOwned,
b7449926
XL
46 | ^^^^^^^^^^^ allocation not allowed in statics
47
48error[E0010]: allocations are not allowed in statics
1b1a35ee 49 --> $DIR/check-static-values-constraints.rs:106:5
b7449926
XL
50 |
51LL | box 3;
52 | ^^^^^ allocation not allowed in statics
53
dc9dc135 54error[E0507]: cannot move out of static item `x`
1b1a35ee 55 --> $DIR/check-static-values-constraints.rs:110:45
b7449926
XL
56 |
57LL | let y = { static x: Box<isize> = box 3; x };
48663c56
XL
58 | ^
59 | |
1b1a35ee 60 | move occurs because `x` has type `Box<isize>`, which does not implement the `Copy` trait
48663c56 61 | help: consider borrowing here: `&x`
b7449926
XL
62
63error[E0010]: allocations are not allowed in statics
1b1a35ee 64 --> $DIR/check-static-values-constraints.rs:110:38
b7449926
XL
65 |
66LL | let y = { static x: Box<isize> = box 3; x };
67 | ^^^^^ allocation not allowed in statics
68
1b1a35ee 69error: aborting due to 10 previous errors
b7449926 70
1b1a35ee 71Some errors have detailed explanations: E0010, E0015, E0493, E0507.
b7449926 72For more information about an error, try `rustc --explain E0010`.