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