]> git.proxmox.com Git - rustc.git/blame - src/test/ui/error-codes/E0605.stderr
New upstream version 1.63.0+dfsg1
[rustc.git] / src / test / ui / error-codes / E0605.stderr
CommitLineData
1b1a35ee 1error[E0605]: non-primitive cast: `u8` as `Vec<u8>`
0731742a 2 --> $DIR/E0605.rs:3:5
2c00a5a8 3 |
532ac7d7 4LL | 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
7error[E0605]: non-primitive cast: `*const u8` as `&u8`
0731742a 8 --> $DIR/E0605.rs:6:5
2c00a5a8 9 |
532ac7d7 10LL | v as &u8;
17df50a5
XL
11 | ^^^^^^^^ invalid cast
12 |
13help: consider borrowing the value
14 |
c295e0f8
XL
15LL - v as &u8;
16LL + &*v;
923072b8 17 |
2c00a5a8
XL
18
19error: aborting due to 2 previous errors
20
0531ce1d 21For more information about this error, try `rustc --explain E0605`.