summaryrefslogtreecommitdiffstats
path: root/tests/ui/did_you_mean/issue-87830-try-brackets-for-arrays.stderr
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
commit218caa410aa38c29984be31a5229b9fa717560ee (patch)
treec54bd55eeb6e4c508940a30e94c0032fbd45d677 /tests/ui/did_you_mean/issue-87830-try-brackets-for-arrays.stderr
parentReleasing progress-linux version 1.67.1+dfsg1-1~progress7.99u1. (diff)
downloadrustc-218caa410aa38c29984be31a5229b9fa717560ee.tar.xz
rustc-218caa410aa38c29984be31a5229b9fa717560ee.zip
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/did_you_mean/issue-87830-try-brackets-for-arrays.stderr')
-rw-r--r--tests/ui/did_you_mean/issue-87830-try-brackets-for-arrays.stderr48
1 files changed, 48 insertions, 0 deletions
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
+