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