]> git.proxmox.com Git - rustc.git/blame - src/test/ui/dst/dst-rvalue.nll.stderr
New upstream version 1.31.0~beta.4+dfsg1
[rustc.git] / src / test / ui / dst / dst-rvalue.nll.stderr
CommitLineData
b7449926
XL
1error[E0161]: cannot move a value of type str: the size of str cannot be statically determined
2 --> $DIR/dst-rvalue.rs:16:28
3 |
4LL | let _x: Box<str> = box *"hello world";
5 | ^^^^^^^^^^^^^^
6
7error[E0161]: cannot move a value of type [isize]: the size of [isize] cannot be statically determined
8 --> $DIR/dst-rvalue.rs:21:32
9 |
10LL | let _x: Box<[isize]> = box *array;
11 | ^^^^^^
12
13error[E0507]: cannot move out of borrowed content
14 --> $DIR/dst-rvalue.rs:16:28
15 |
16LL | let _x: Box<str> = box *"hello world";
17 | ^^^^^^^^^^^^^^ cannot move out of borrowed content
18
0bf4aa26
XL
19error[E0507]: cannot move out of data in a `&` reference
20 --> $DIR/dst-rvalue.rs:16:28
21 |
22LL | let _x: Box<str> = box *"hello world";
23 | ^^^^^^^^^^^^^^
24 | |
25 | cannot move out of data in a `&` reference
26 | cannot move
27
b7449926
XL
28error[E0508]: cannot move out of type `[isize]`, a non-copy slice
29 --> $DIR/dst-rvalue.rs:21:32
30 |
31LL | let _x: Box<[isize]> = box *array;
32 | ^^^^^^ cannot move out of here
33
0bf4aa26
XL
34error[E0507]: cannot move out of `*array` which is behind a `&` reference
35 --> $DIR/dst-rvalue.rs:21:32
36 |
37LL | let array: &[isize] = &[1, 2, 3];
38 | ---------- help: consider changing this to be a mutable reference: `&mut [1, 2, 3]`
39LL | let _x: Box<[isize]> = box *array;
40 | ^^^^^^
41 | |
42 | cannot move out of `*array` which is behind a `&` reference
43 | `array` is a `&` reference, so the data it refers to cannot be moved
44
45error: aborting due to 6 previous errors
b7449926
XL
46
47Some errors occurred: E0161, E0507, E0508.
48For more information about an error, try `rustc --explain E0161`.