]> git.lizzy.rs Git - rust.git/blob - tests/ui/did_you_mean/issue-87830-try-brackets-for-arrays.stderr
Rollup merge of #104965 - zacklukem:p-option-as_ref-docs, r=scottmcm
[rust.git] / tests / ui / did_you_mean / issue-87830-try-brackets-for-arrays.stderr
1 error: this is a block expression, not an array
2   --> $DIR/issue-87830-try-brackets-for-arrays.rs:3:22
3    |
4 LL |   const FOO: [u8; 3] = {
5    |  ______________________^
6 LL | |
7 LL | |     1, 2, 3
8 LL | | };
9    | |_^
10    |
11 help: to make an array, use square brackets instead of curly braces
12    |
13 LL ~ const FOO: [u8; 3] = [
14 LL |
15 LL |     1, 2, 3
16 LL ~ ];
17    |
18
19 error: this is a block expression, not an array
20   --> $DIR/issue-87830-try-brackets-for-arrays.rs:8:24
21    |
22 LL | const BAR: [&str; 3] = {"one", "two", "three"};
23    |                        ^^^^^^^^^^^^^^^^^^^^^^^
24    |
25 help: to make an array, use square brackets instead of curly braces
26    |
27 LL | const BAR: [&str; 3] = ["one", "two", "three"];
28    |                        ~                     ~
29
30 error: this is a block expression, not an array
31   --> $DIR/issue-87830-try-brackets-for-arrays.rs:12:5
32    |
33 LL |     {1, 2, 3};
34    |     ^^^^^^^^^
35    |
36 help: to make an array, use square brackets instead of curly braces
37    |
38 LL |     [1, 2, 3];
39    |     ~       ~
40
41 error: expected one of `.`, `;`, `?`, `}`, or an operator, found `,`
42   --> $DIR/issue-87830-try-brackets-for-arrays.rs:17:6
43    |
44 LL |     1, 2, 3
45    |      ^ expected one of `.`, `;`, `?`, `}`, or an operator
46
47 error: aborting due to 4 previous errors
48