]> git.lizzy.rs Git - rust.git/blob - src/test/ui/mir/drop-elaboration-after-borrowck-error.stderr
Rollup merge of #101388 - compiler-errors:issue-101376, r=fee1-dead
[rust.git] / src / test / ui / mir / drop-elaboration-after-borrowck-error.stderr
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]: 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 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`.