about summary refs log tree commit diff
path: root/tests/ui/cast/cast-to-slice.stderr
blob: 382ccc3d10c9170e332dc669ccbc8c72dbf91afa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
error[E0620]: cast to unsized type: `&[u8]` as `[char]`
  --> $DIR/cast-to-slice.rs:2:5
   |
LL |     "example".as_bytes() as [char];
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
help: consider casting to a reference instead
   |
LL |     "example".as_bytes() as &[char];
   |                             +

error[E0620]: cast to unsized type: `&[u8]` as `[char]`
  --> $DIR/cast-to-slice.rs:6:5
   |
LL |     arr as [char];
   |     ^^^^^^^^^^^^^
   |
help: consider casting to a reference instead
   |
LL |     arr as &[char];
   |            +

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0620`.