]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/const-eval/const_let.stderr
Auto merge of #81132 - bugadani:map-prealloc, r=matthewjasper
[rust.git] / src / test / ui / consts / const-eval / const_let.stderr
1 error[E0493]: destructors cannot be evaluated at compile-time
2   --> $DIR/const_let.rs:16:32
3    |
4 LL | const Y: FakeNeedsDrop = { let mut x = FakeNeedsDrop; x = FakeNeedsDrop; x };
5    |                                ^^^^^                  - value is dropped here
6    |                                |
7    |                                constants cannot evaluate destructors
8
9 error[E0493]: destructors cannot be evaluated at compile-time
10   --> $DIR/const_let.rs:20:33
11    |
12 LL | const Y2: FakeNeedsDrop = { let mut x; x = FakeNeedsDrop; x = FakeNeedsDrop; x };
13    |                                 ^^^^^                     - value is dropped here
14    |                                 |
15    |                                 constants cannot evaluate destructors
16
17 error[E0493]: destructors cannot be evaluated at compile-time
18   --> $DIR/const_let.rs:24:21
19    |
20 LL | const Z: () = { let mut x = None; x = Some(FakeNeedsDrop); };
21    |                     ^^^^^                                  - value is dropped here
22    |                     |
23    |                     constants cannot evaluate destructors
24
25 error[E0493]: destructors cannot be evaluated at compile-time
26   --> $DIR/const_let.rs:28:22
27    |
28 LL | const Z2: () = { let mut x; x = None; x = Some(FakeNeedsDrop); };
29    |                      ^^^^^                                     - value is dropped here
30    |                      |
31    |                      constants cannot evaluate destructors
32
33 error: aborting due to 4 previous errors
34
35 For more information about this error, try `rustc --explain E0493`.