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