]> git.proxmox.com Git - rustc.git/blob - tests/ui/mir/drop-elaboration-after-borrowck-error.stderr
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / ui / mir / drop-elaboration-after-borrowck-error.stderr
1 error[E0493]: destructor of `String` 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 | the destructor for this type cannot be evaluated in statics
8 | value is dropped here
9
10 error[E0493]: destructor of `[String; 1]` cannot be evaluated at compile-time
11 --> $DIR/drop-elaboration-after-borrowck-error.rs:5:9
12 |
13 LL | let a: [String; 1];
14 | ^ the destructor for this type cannot be evaluated in statics
15 ...
16 LL | };
17 | - value is dropped here
18
19 error[E0381]: used binding `a` isn't initialized
20 --> $DIR/drop-elaboration-after-borrowck-error.rs:7:5
21 |
22 LL | let a: [String; 1];
23 | - binding declared here but left uninitialized
24 LL |
25 LL | a[0] = String::new();
26 | ^^^^ `a` used here but it isn't initialized
27 |
28 help: consider assigning a value
29 |
30 LL | let a: [String; 1] = todo!();
31 | +++++++++
32
33 error[E0493]: destructor of `T` cannot be evaluated at compile-time
34 --> $DIR/drop-elaboration-after-borrowck-error.rs:18:9
35 |
36 LL | self.0[0] = other;
37 | ^^^^^^^^^
38 | |
39 | the destructor for this type cannot be evaluated in constant functions
40 | value is dropped here
41
42 error[E0493]: destructor of `B<T>` cannot be evaluated at compile-time
43 --> $DIR/drop-elaboration-after-borrowck-error.rs:16:13
44 |
45 LL | let _this = self;
46 | ^^^^^ the destructor for this type cannot be evaluated in constant functions
47 ...
48 LL | }
49 | - value is dropped here
50
51 error[E0382]: use of moved value: `self.0`
52 --> $DIR/drop-elaboration-after-borrowck-error.rs:18:9
53 |
54 LL | 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
56 LL | let _this = self;
57 | ---- value moved here
58 LL |
59 LL | self.0[0] = other;
60 | ^^^^^^^^^ value used here after move
61
62 error: aborting due to 6 previous errors
63
64 Some errors have detailed explanations: E0381, E0382, E0493.
65 For more information about an error, try `rustc --explain E0381`.