]> git.lizzy.rs Git - rust.git/blob - src/test/ui/drop/repeat-drop-2.stderr
Auto merge of #102684 - JhonnyBillM:delete-target-data-layout-errors-wrapper, r=davidtwco
[rust.git] / src / test / ui / drop / repeat-drop-2.stderr
1 error[E0382]: use of moved value: `foo`
2   --> $DIR/repeat-drop-2.rs:4:17
3    |
4 LL |     let foo = String::new();
5    |         --- move occurs because `foo` has type `String`, which does not implement the `Copy` trait
6 LL |     let _bar = foo;
7    |                --- value moved here
8 LL |     let _baz = [foo; 0];
9    |                 ^^^ value used here after move
10
11 error[E0493]: destructor of `String` cannot be evaluated at compile-time
12   --> $DIR/repeat-drop-2.rs:7:25
13    |
14 LL | const _: [String; 0] = [String::new(); 0];
15    |                        -^^^^^^^^^^^^^----
16    |                        ||
17    |                        |the destructor for this type cannot be evaluated in constants
18    |                        value is dropped here
19
20 error[E0381]: used binding `x` isn't initialized
21   --> $DIR/repeat-drop-2.rs:12:14
22    |
23 LL |     let x: u8;
24    |         - binding declared here but left uninitialized
25 LL |     let _ = [x; 0];
26    |              ^ `x` used here but it isn't initialized
27    |
28 help: consider assigning a value
29    |
30 LL |     let x: u8 = 0;
31    |               +++
32
33 error: aborting due to 3 previous errors
34
35 Some errors have detailed explanations: E0381, E0382, E0493.
36 For more information about an error, try `rustc --explain E0381`.