2022-09-23 14:22:36 +00:00
|
|
|
error[E0493]: destructor of `String` cannot be evaluated at compile-time
|
2021-12-22 00:00:00 +00:00
|
|
|
--> $DIR/drop-elaboration-after-borrowck-error.rs:7:5
|
|
|
|
|
|
|
|
|
LL | a[0] = String::new();
|
|
|
|
| ^^^^
|
|
|
|
| |
|
2022-09-23 14:22:36 +00:00
|
|
|
| the destructor for this type cannot be evaluated in statics
|
2021-12-22 00:00:00 +00:00
|
|
|
| value is dropped here
|
|
|
|
|
2022-09-23 14:22:36 +00:00
|
|
|
error[E0493]: destructor of `[String; 1]` cannot be evaluated at compile-time
|
2021-12-22 00:00:00 +00:00
|
|
|
--> $DIR/drop-elaboration-after-borrowck-error.rs:5:9
|
|
|
|
|
|
|
|
|
LL | let a: [String; 1];
|
2022-09-23 14:22:36 +00:00
|
|
|
| ^ the destructor for this type cannot be evaluated in statics
|
2021-12-22 00:00:00 +00:00
|
|
|
...
|
|
|
|
LL | };
|
|
|
|
| - value is dropped here
|
|
|
|
|
2022-06-21 22:54:17 +00:00
|
|
|
error[E0381]: used binding `a` isn't initialized
|
2021-12-22 00:00:00 +00:00
|
|
|
--> $DIR/drop-elaboration-after-borrowck-error.rs:7:5
|
|
|
|
|
|
2022-06-21 18:57:45 +00:00
|
|
|
LL | let a: [String; 1];
|
2022-06-21 22:54:17 +00:00
|
|
|
| - binding declared here but left uninitialized
|
2022-06-21 18:57:45 +00:00
|
|
|
LL |
|
2021-12-22 00:00:00 +00:00
|
|
|
LL | a[0] = String::new();
|
2022-06-21 18:57:45 +00:00
|
|
|
| ^^^^ `a` used here but it isn't initialized
|
2022-09-23 07:28:48 +00:00
|
|
|
|
|
|
|
|
help: consider assigning a value
|
|
|
|
|
|
|
|
|
LL | let a: [String; 1] = todo!();
|
|
|
|
| +++++++++
|
2021-12-22 00:00:00 +00:00
|
|
|
|
2022-09-23 14:22:36 +00:00
|
|
|
error[E0493]: destructor of `T` cannot be evaluated at compile-time
|
2021-12-22 00:00:00 +00:00
|
|
|
--> $DIR/drop-elaboration-after-borrowck-error.rs:18:9
|
|
|
|
|
|
|
|
|
LL | self.0[0] = other;
|
|
|
|
| ^^^^^^^^^
|
|
|
|
| |
|
2022-09-23 14:22:36 +00:00
|
|
|
| the destructor for this type cannot be evaluated in constant functions
|
2021-12-22 00:00:00 +00:00
|
|
|
| value is dropped here
|
|
|
|
|
2022-09-23 14:22:36 +00:00
|
|
|
error[E0493]: destructor of `B<T>` cannot be evaluated at compile-time
|
2021-12-22 00:00:00 +00:00
|
|
|
--> $DIR/drop-elaboration-after-borrowck-error.rs:16:13
|
|
|
|
|
|
|
|
|
LL | let _this = self;
|
2022-09-23 14:22:36 +00:00
|
|
|
| ^^^^^ the destructor for this type cannot be evaluated in constant functions
|
2021-12-22 00:00:00 +00:00
|
|
|
...
|
|
|
|
LL | }
|
|
|
|
| - value is dropped here
|
|
|
|
|
|
|
|
error[E0382]: use of moved value: `self.0`
|
|
|
|
--> $DIR/drop-elaboration-after-borrowck-error.rs:18:9
|
|
|
|
|
|
|
|
|
LL | pub const fn f(mut self, other: T) -> Self {
|
|
|
|
| -------- move occurs because `self` has type `B<T>`, which does not implement the `Copy` trait
|
|
|
|
LL | let _this = self;
|
|
|
|
| ---- value moved here
|
|
|
|
LL |
|
|
|
|
LL | self.0[0] = other;
|
|
|
|
| ^^^^^^^^^ value used here after move
|
|
|
|
|
|
|
|
error: aborting due to 6 previous errors
|
|
|
|
|
|
|
|
Some errors have detailed explanations: E0381, E0382, E0493.
|
|
|
|
For more information about an error, try `rustc --explain E0381`.
|