File tree 3 files changed +7
-15
lines changed
3 files changed +7
-15
lines changed Original file line number Diff line number Diff line change 1
1
error[E0620]: cast to unsized type: `&[u8]` as `[char]`
2
2
--> $DIR/cast-to-slice.rs:2:5
3
3
|
4
- LL | "example".as_bytes() as [char];
4
+ LL | "example".as_bytes() as [char];
5
5
| ^^^^^^^^^^^^^^^^^^^^^^^^------
6
6
| |
7
7
| 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]`
2
2
--> $DIR/E0620.rs:2:16
3
3
|
4
4
LL | 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]`
12
8
13
9
error: aborting due to 1 previous error
14
10
Original file line number Diff line number Diff line change @@ -2,13 +2,9 @@ error[E0620]: cast to unsized type: `&[usize; 2]` as `[usize]`
2
2
--> $DIR/issue-17441.rs:2:16
3
3
|
4
4
LL | 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]`
12
8
13
9
error[E0620]: cast to unsized type: `Box<usize>` as `dyn Debug`
14
10
--> $DIR/issue-17441.rs:5:16
You can’t perform that action at this time.
0 commit comments