|
1 |
| -error[E0161]: cannot move a value of type str: the size of str cannot be statically determined |
| 1 | +error[E0277]: the size for values of type `str` cannot be known at compilation time |
2 | 2 | --> $DIR/dst-rvalue.rs:6:28
|
3 | 3 | |
|
4 | 4 | LL | let _x: Box<str> = box *"hello world";
|
5 |
| - | ^^^^^^^^^^^^^^ |
6 |
| - |
7 |
| -error[E0161]: cannot move a value of type [isize]: the size of [isize] cannot be statically determined |
8 |
| - --> $DIR/dst-rvalue.rs:11:32 |
| 5 | + | ^^^^^^^^^^^^^^ doesn't have a size known at compile-time |
9 | 6 | |
|
10 |
| -LL | let _x: Box<[isize]> = box *array; |
11 |
| - | ^^^^^^ |
| 7 | + = help: the trait `Sized` is not implemented for `str` |
| 8 | + = note: the type of a box expression must have a statically known size |
12 | 9 |
|
13 |
| -error[E0507]: cannot move out of a shared reference |
14 |
| - --> $DIR/dst-rvalue.rs:6:28 |
15 |
| - | |
16 |
| -LL | let _x: Box<str> = box *"hello world"; |
17 |
| - | ^^^^^^^^^^^^^^ move occurs because value has type `str`, which does not implement the `Copy` trait |
18 |
| - |
19 |
| -error[E0508]: cannot move out of type `[isize]`, a non-copy slice |
20 |
| - --> $DIR/dst-rvalue.rs:11:32 |
| 10 | +error[E0277]: the size for values of type `[isize]` cannot be known at compilation time |
| 11 | + --> $DIR/dst-rvalue.rs:10:32 |
21 | 12 | |
|
22 | 13 | LL | let _x: Box<[isize]> = box *array;
|
23 |
| - | ^^^^^^ |
24 |
| - | | |
25 |
| - | cannot move out of here |
26 |
| - | move occurs because `*array` has type `[isize]`, which does not implement the `Copy` trait |
| 14 | + | ^^^^^^ doesn't have a size known at compile-time |
| 15 | + | |
| 16 | + = help: the trait `Sized` is not implemented for `[isize]` |
| 17 | + = note: the type of a box expression must have a statically known size |
27 | 18 |
|
28 |
| -error: aborting due to 4 previous errors |
| 19 | +error: aborting due to 2 previous errors |
29 | 20 |
|
30 |
| -Some errors have detailed explanations: E0161, E0507, E0508. |
31 |
| -For more information about an error, try `rustc --explain E0161`. |
| 21 | +For more information about this error, try `rustc --explain E0277`. |
0 commit comments