about summary refs log tree commit diff
path: root/tests/ui/array-slice-vec
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2025-01-02 22:19:45 +0000
committerMichael Goulet <michael@errs.io>2025-01-02 23:39:17 +0000
commit7601adb4a06be26c5d240b7678ea1d0f661be5ed (patch)
tree8de5bf081062887b7cea500f4ae00b5f71c27496 /tests/ui/array-slice-vec
parent8e344ae127782afeda06062266945b8f6368c985 (diff)
downloadrust-7601adb4a06be26c5d240b7678ea1d0f661be5ed.tar.gz
rust-7601adb4a06be26c5d240b7678ea1d0f661be5ed.zip
Make suggestion verbose and tweak error message
Diffstat (limited to 'tests/ui/array-slice-vec')
-rw-r--r--tests/ui/array-slice-vec/suggest-array-length.stderr40
1 files changed, 24 insertions, 16 deletions
diff --git a/tests/ui/array-slice-vec/suggest-array-length.stderr b/tests/ui/array-slice-vec/suggest-array-length.stderr
index c0fc2989d5b..b71be306780 100644
--- a/tests/ui/array-slice-vec/suggest-array-length.stderr
+++ b/tests/ui/array-slice-vec/suggest-array-length.stderr
@@ -2,37 +2,45 @@ error[E0121]: the placeholder `_` is not allowed within types on item signatures
   --> $DIR/suggest-array-length.rs:5:22
    |
 LL |     const Foo: [i32; _] = [1, 2, 3];
-   |                ------^-
-   |                |     |
-   |                |     not allowed in type signatures
-   |                help: replace with the correct type: `[i32; 3]`
+   |                      ^ not allowed in type signatures
+   |
+help: replace this with a fully-specified type
+   |
+LL |     const Foo: [i32; 3] = [1, 2, 3];
+   |                ~~~~~~~~
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for constants
   --> $DIR/suggest-array-length.rs:7:26
    |
 LL |     const REF_FOO: &[u8; _] = &[1];
-   |                    ------^-
-   |                    |     |
-   |                    |     not allowed in type signatures
-   |                    help: replace with the correct type: `&[u8; 1]`
+   |                          ^ not allowed in type signatures
+   |
+help: replace this with a fully-specified type
+   |
+LL |     const REF_FOO: &[u8; 1] = &[1];
+   |                    ~~~~~~~~
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for static variables
   --> $DIR/suggest-array-length.rs:9:26
    |
 LL |     static Statik: [i32; _] = [1, 2, 3];
-   |                    ------^-
-   |                    |     |
-   |                    |     not allowed in type signatures
-   |                    help: replace with the correct type: `[i32; 3]`
+   |                          ^ not allowed in type signatures
+   |
+help: replace this with a fully-specified type
+   |
+LL |     static Statik: [i32; 3] = [1, 2, 3];
+   |                    ~~~~~~~~
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for static variables
   --> $DIR/suggest-array-length.rs:11:30
    |
 LL |     static REF_STATIK: &[u8; _] = &[1];
-   |                        ------^-
-   |                        |     |
-   |                        |     not allowed in type signatures
-   |                        help: replace with the correct type: `&[u8; 1]`
+   |                              ^ not allowed in type signatures
+   |
+help: replace this with a fully-specified type
+   |
+LL |     static REF_STATIK: &[u8; 1] = &[1];
+   |                        ~~~~~~~~
 
 error[E0658]: using `_` for array lengths is unstable
   --> $DIR/suggest-array-length.rs:13:20