]> git.proxmox.com Git - rustc.git/blob - src/test/ui/error-codes/E0605.stderr
New upstream version 1.63.0+dfsg1
[rustc.git] / src / test / ui / error-codes / E0605.stderr
1 error[E0605]: non-primitive cast: `u8` as `Vec<u8>`
2 --> $DIR/E0605.rs:3:5
3 |
4 LL | x as Vec<u8>;
5 | ^^^^^^^^^^^^ an `as` expression can only be used to convert between primitive types or to coerce to a specific trait object
6
7 error[E0605]: non-primitive cast: `*const u8` as `&u8`
8 --> $DIR/E0605.rs:6:5
9 |
10 LL | v as &u8;
11 | ^^^^^^^^ invalid cast
12 |
13 help: consider borrowing the value
14 |
15 LL - v as &u8;
16 LL + &*v;
17 |
18
19 error: aborting due to 2 previous errors
20
21 For more information about this error, try `rustc --explain E0605`.