|
| 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 | + |
| 19 | +error[E0381]: use of possibly-uninitialized variable: `a` |
| 20 | + --> $DIR/drop-elaboration-after-borrowck-error.rs:7:5 |
| 21 | + | |
| 22 | +LL | a[0] = String::new(); |
| 23 | + | ^^^^ use of possibly-uninitialized `a` |
| 24 | + |
| 25 | +error[E0493]: destructors cannot be evaluated at compile-time |
| 26 | + --> $DIR/drop-elaboration-after-borrowck-error.rs:18:9 |
| 27 | + | |
| 28 | +LL | self.0[0] = other; |
| 29 | + | ^^^^^^^^^ |
| 30 | + | | |
| 31 | + | constant functions cannot evaluate destructors |
| 32 | + | value is dropped here |
| 33 | + |
| 34 | +error[E0493]: destructors cannot be evaluated at compile-time |
| 35 | + --> $DIR/drop-elaboration-after-borrowck-error.rs:16:13 |
| 36 | + | |
| 37 | +LL | let _this = self; |
| 38 | + | ^^^^^ constant functions cannot evaluate destructors |
| 39 | +... |
| 40 | +LL | } |
| 41 | + | - value is dropped here |
| 42 | + |
| 43 | +error[E0382]: use of moved value: `self.0` |
| 44 | + --> $DIR/drop-elaboration-after-borrowck-error.rs:18:9 |
| 45 | + | |
| 46 | +LL | pub const fn f(mut self, other: T) -> Self { |
| 47 | + | -------- move occurs because `self` has type `B<T>`, which does not implement the `Copy` trait |
| 48 | +LL | let _this = self; |
| 49 | + | ---- value moved here |
| 50 | +LL | |
| 51 | +LL | self.0[0] = other; |
| 52 | + | ^^^^^^^^^ value used here after move |
| 53 | + |
| 54 | +error: aborting due to 6 previous errors |
| 55 | + |
| 56 | +Some errors have detailed explanations: E0381, E0382, E0493. |
| 57 | +For more information about an error, try `rustc --explain E0381`. |
0 commit comments