Skip to content

Commit 286f2d8

Browse files
Update existing tests
1 parent e6e195e commit 286f2d8

File tree

3 files changed

+7
-15
lines changed

3 files changed

+7
-15
lines changed

tests/ui/cast/cast-to-slice.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
error[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]`

tests/ui/error-codes/E0620.stderr

+3-7
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,9 @@ error[E0620]: cast to unsized type: `&[usize; 2]` as `[usize]`
22
--> $DIR/E0620.rs:2:16
33
|
44
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]`
128

139
error: aborting due to 1 previous error
1410

tests/ui/issues/issue-17441.stderr

+3-7
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,9 @@ error[E0620]: cast to unsized type: `&[usize; 2]` as `[usize]`
22
--> $DIR/issue-17441.rs:2:16
33
|
44
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]`
128

139
error[E0620]: cast to unsized type: `Box<usize>` as `dyn Debug`
1410
--> $DIR/issue-17441.rs:5:16

0 commit comments

Comments
 (0)