]>
Commit | Line | Data |
---|---|---|
1b1a35ee | 1 | error[E0605]: non-primitive cast: `u8` as `Vec<u8>` |
0731742a | 2 | --> $DIR/E0605.rs:3:5 |
2c00a5a8 | 3 | | |
532ac7d7 | 4 | LL | x as Vec<u8>; |
f035d41b | 5 | | ^^^^^^^^^^^^ an `as` expression can only be used to convert between primitive types or to coerce to a specific trait object |
2c00a5a8 XL |
6 | |
7 | error[E0605]: non-primitive cast: `*const u8` as `&u8` | |
0731742a | 8 | --> $DIR/E0605.rs:6:5 |
2c00a5a8 | 9 | | |
532ac7d7 | 10 | LL | v as &u8; |
17df50a5 XL |
11 | | ^^^^^^^^ invalid cast |
12 | | | |
13 | help: consider borrowing the value | |
14 | | | |
c295e0f8 XL |
15 | LL - v as &u8; |
16 | LL + &*v; | |
923072b8 | 17 | | |
2c00a5a8 XL |
18 | |
19 | error: aborting due to 2 previous errors | |
20 | ||
0531ce1d | 21 | For more information about this error, try `rustc --explain E0605`. |