about summary refs log tree commit diff
diff options
context:
space:
mode:
authorVeera <sveera.2001@gmail.com>2023-12-20 22:53:56 -0500
committerVeera <sveera.2001@gmail.com>2023-12-20 22:53:56 -0500
commit286f2d819eec03525992b8e4aeb201c3fb987a88 (patch)
tree8ecaf7adf5b1365df5d52323a41d8cb614f7e65a
parente6e195e27e6d5d12a135e4a40472c253bd63a77f (diff)
downloadrust-286f2d819eec03525992b8e4aeb201c3fb987a88.tar.gz
rust-286f2d819eec03525992b8e4aeb201c3fb987a88.zip
Update existing tests
-rw-r--r--tests/ui/cast/cast-to-slice.stderr2
-rw-r--r--tests/ui/error-codes/E0620.stderr10
-rw-r--r--tests/ui/issues/issue-17441.stderr10
3 files changed, 7 insertions, 15 deletions
diff --git a/tests/ui/cast/cast-to-slice.stderr b/tests/ui/cast/cast-to-slice.stderr
index 340c9c48859..8f862c00014 100644
--- a/tests/ui/cast/cast-to-slice.stderr
+++ b/tests/ui/cast/cast-to-slice.stderr
@@ -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]`
diff --git a/tests/ui/error-codes/E0620.stderr b/tests/ui/error-codes/E0620.stderr
index 5bc8903624c..644ba813c96 100644
--- a/tests/ui/error-codes/E0620.stderr
+++ b/tests/ui/error-codes/E0620.stderr
@@ -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
 
diff --git a/tests/ui/issues/issue-17441.stderr b/tests/ui/issues/issue-17441.stderr
index 4dbe50178cf..29e50b91c7c 100644
--- a/tests/ui/issues/issue-17441.stderr
+++ b/tests/ui/issues/issue-17441.stderr
@@ -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