From 218caa410aa38c29984be31a5229b9fa717560ee Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:19:13 +0200 Subject: Merging upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- .../issue-87830-try-brackets-for-arrays.stderr | 48 ++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 tests/ui/did_you_mean/issue-87830-try-brackets-for-arrays.stderr (limited to 'tests/ui/did_you_mean/issue-87830-try-brackets-for-arrays.stderr') diff --git a/tests/ui/did_you_mean/issue-87830-try-brackets-for-arrays.stderr b/tests/ui/did_you_mean/issue-87830-try-brackets-for-arrays.stderr new file mode 100644 index 000000000..d5ad1a72b --- /dev/null +++ b/tests/ui/did_you_mean/issue-87830-try-brackets-for-arrays.stderr @@ -0,0 +1,48 @@ +error: this is a block expression, not an array + --> $DIR/issue-87830-try-brackets-for-arrays.rs:3:22 + | +LL | const FOO: [u8; 3] = { + | ______________________^ +LL | | +LL | | 1, 2, 3 +LL | | }; + | |_^ + | +help: to make an array, use square brackets instead of curly braces + | +LL ~ const FOO: [u8; 3] = [ +LL | +LL | 1, 2, 3 +LL ~ ]; + | + +error: this is a block expression, not an array + --> $DIR/issue-87830-try-brackets-for-arrays.rs:8:24 + | +LL | const BAR: [&str; 3] = {"one", "two", "three"}; + | ^^^^^^^^^^^^^^^^^^^^^^^ + | +help: to make an array, use square brackets instead of curly braces + | +LL | const BAR: [&str; 3] = ["one", "two", "three"]; + | ~ ~ + +error: this is a block expression, not an array + --> $DIR/issue-87830-try-brackets-for-arrays.rs:12:5 + | +LL | {1, 2, 3}; + | ^^^^^^^^^ + | +help: to make an array, use square brackets instead of curly braces + | +LL | [1, 2, 3]; + | ~ ~ + +error: expected one of `.`, `;`, `?`, `}`, or an operator, found `,` + --> $DIR/issue-87830-try-brackets-for-arrays.rs:17:6 + | +LL | 1, 2, 3 + | ^ expected one of `.`, `;`, `?`, `}`, or an operator + +error: aborting due to 4 previous errors + -- cgit v1.2.3