summaryrefslogtreecommitdiffstats
path: root/src/test/ui/did_you_mean/issue-87830-try-brackets-for-arrays.stderr
blob: d5ad1a72b8250444ba5cd6a9a7e97b38af8584fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
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