From 7601adb4a06be26c5d240b7678ea1d0f661be5ed Mon Sep 17 00:00:00 2001 From: Michael Goulet Date: Thu, 2 Jan 2025 22:19:45 +0000 Subject: Make suggestion verbose and tweak error message --- .../ui/array-slice-vec/suggest-array-length.stderr | 40 +++++++++++++--------- 1 file changed, 24 insertions(+), 16 deletions(-) (limited to 'tests/ui/array-slice-vec') 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 -- cgit 1.4.1-3-g733a5