Update existing tests

This commit is contained in:
Veera 2023-12-20 22:53:56 -05:00
parent e6e195e27e
commit 286f2d819e
3 changed files with 7 additions and 15 deletions

View File

@ -1,7 +1,7 @@
error[E0620]: cast to unsized type: `&[u8]` as `[char]`
--> $DIR/cast-to-slice.rs:2:5
|
LL | "example".as_bytes() as [char];
LL | "example".as_bytes() as [char];
| ^^^^^^^^^^^^^^^^^^^^^^^^------
| |
| help: try casting to a reference instead: `&[char]`

View File

@ -2,13 +2,9 @@ error[E0620]: cast to unsized type: `&[usize; 2]` as `[usize]`
--> $DIR/E0620.rs:2:16
|
LL | let _foo = &[1_usize, 2] as [usize];
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
help: consider using an implicit coercion to `&[usize]` instead
--> $DIR/E0620.rs:2:16
|
LL | let _foo = &[1_usize, 2] as [usize];
| ^^^^^^^^^^^^^^^^^^^^^^^^
| ^^^^^^^^^^^^^^^^^-------
| |
| help: try casting to a reference instead: `&[usize]`
error: aborting due to 1 previous error

View File

@ -2,13 +2,9 @@ error[E0620]: cast to unsized type: `&[usize; 2]` as `[usize]`
--> $DIR/issue-17441.rs:2:16
|
LL | let _foo = &[1_usize, 2] as [usize];
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
help: consider using an implicit coercion to `&[usize]` instead
--> $DIR/issue-17441.rs:2:16
|
LL | let _foo = &[1_usize, 2] as [usize];
| ^^^^^^^^^^^^^^^^^^^^^^^^
| ^^^^^^^^^^^^^^^^^-------
| |
| help: try casting to a reference instead: `&[usize]`
error[E0620]: cast to unsized type: `Box<usize>` as `dyn Debug`
--> $DIR/issue-17441.rs:5:16