]>
Commit | Line | Data |
---|---|---|
a2a8927a XL |
1 | error[E0493]: destructors cannot be evaluated at compile-time |
2 | --> $DIR/drop-elaboration-after-borrowck-error.rs:7:5 | |
3 | | | |
4 | LL | a[0] = String::new(); | |
5 | | ^^^^ | |
6 | | | | |
7 | | statics cannot evaluate destructors | |
8 | | value is dropped here | |
9 | ||
10 | error[E0493]: destructors cannot be evaluated at compile-time | |
11 | --> $DIR/drop-elaboration-after-borrowck-error.rs:5:9 | |
12 | | | |
13 | LL | let a: [String; 1]; | |
14 | | ^ statics cannot evaluate destructors | |
15 | ... | |
16 | LL | }; | |
17 | | - value is dropped here | |
18 | ||
064997fb | 19 | error[E0381]: used binding `a` isn't initialized |
a2a8927a XL |
20 | --> $DIR/drop-elaboration-after-borrowck-error.rs:7:5 |
21 | | | |
064997fb FG |
22 | LL | let a: [String; 1]; |
23 | | - binding declared here but left uninitialized | |
24 | LL | | |
a2a8927a | 25 | LL | a[0] = String::new(); |
064997fb | 26 | | ^^^^ `a` used here but it isn't initialized |
a2a8927a XL |
27 | |
28 | error[E0493]: destructors cannot be evaluated at compile-time | |
29 | --> $DIR/drop-elaboration-after-borrowck-error.rs:18:9 | |
30 | | | |
31 | LL | self.0[0] = other; | |
32 | | ^^^^^^^^^ | |
33 | | | | |
34 | | constant functions cannot evaluate destructors | |
35 | | value is dropped here | |
36 | ||
37 | error[E0493]: destructors cannot be evaluated at compile-time | |
38 | --> $DIR/drop-elaboration-after-borrowck-error.rs:16:13 | |
39 | | | |
40 | LL | let _this = self; | |
41 | | ^^^^^ constant functions cannot evaluate destructors | |
42 | ... | |
43 | LL | } | |
44 | | - value is dropped here | |
45 | ||
46 | error[E0382]: use of moved value: `self.0` | |
47 | --> $DIR/drop-elaboration-after-borrowck-error.rs:18:9 | |
48 | | | |
49 | LL | pub const fn f(mut self, other: T) -> Self { | |
50 | | -------- move occurs because `self` has type `B<T>`, which does not implement the `Copy` trait | |
51 | LL | let _this = self; | |
52 | | ---- value moved here | |
53 | LL | | |
54 | LL | self.0[0] = other; | |
55 | | ^^^^^^^^^ value used here after move | |
56 | ||
57 | error: aborting due to 6 previous errors | |
58 | ||
59 | Some errors have detailed explanations: E0381, E0382, E0493. | |
60 | For more information about an error, try `rustc --explain E0381`. |