File tree Expand file tree Collapse file tree 3 files changed +7
-15
lines changed Expand file tree Collapse file tree 3 files changed +7
-15
lines changed Original file line number Diff line number Diff line change 11error[E0620]: cast to unsized type: `&[u8]` as `[char]`
22 --> $DIR/cast-to-slice.rs:2:5
33 |
4- LL | "example".as_bytes() as [char];
4+ LL | "example".as_bytes() as [char];
55 | ^^^^^^^^^^^^^^^^^^^^^^^^------
66 | |
77 | help: try casting to a reference instead: `&[char]`
Original file line number Diff line number Diff line change @@ -2,13 +2,9 @@ error[E0620]: cast to unsized type: `&[usize; 2]` as `[usize]`
22 --> $DIR/E0620.rs:2:16
33 |
44LL | let _foo = &[1_usize, 2] as [usize];
5- | ^^^^^^^^^^^^^^^^^^^^^^^^
6- |
7- help: consider using an implicit coercion to `&[usize]` instead
8- --> $DIR/E0620.rs:2:16
9- |
10- LL | let _foo = &[1_usize, 2] as [usize];
11- | ^^^^^^^^^^^^^^^^^^^^^^^^
5+ | ^^^^^^^^^^^^^^^^^-------
6+ | |
7+ | help: try casting to a reference instead: `&[usize]`
128
139error: aborting due to 1 previous error
1410
Original file line number Diff line number Diff line change @@ -2,13 +2,9 @@ error[E0620]: cast to unsized type: `&[usize; 2]` as `[usize]`
22 --> $DIR/issue-17441.rs:2:16
33 |
44LL | let _foo = &[1_usize, 2] as [usize];
5- | ^^^^^^^^^^^^^^^^^^^^^^^^
6- |
7- help: consider using an implicit coercion to `&[usize]` instead
8- --> $DIR/issue-17441.rs:2:16
9- |
10- LL | let _foo = &[1_usize, 2] as [usize];
11- | ^^^^^^^^^^^^^^^^^^^^^^^^
5+ | ^^^^^^^^^^^^^^^^^-------
6+ | |
7+ | help: try casting to a reference instead: `&[usize]`
128
139error[E0620]: cast to unsized type: `Box<usize>` as `dyn Debug`
1410 --> $DIR/issue-17441.rs:5:16
You can’t perform that action at this time.
0 commit comments