]> git.lizzy.rs Git - rust.git/blob - src/test/ui/did_you_mean/issue-87830-try-brackets-for-arrays.rs
Rollup merge of #95530 - notriddle:notriddle/private-kw-prim, r=jsha
[rust.git] / src / test / ui / did_you_mean / issue-87830-try-brackets-for-arrays.rs
1 fn main() {}
2
3 const FOO: [u8; 3] = {
4     //~^ ERROR this is a block expression, not an array
5     1, 2, 3
6 };
7
8 const BAR: [&str; 3] = {"one", "two", "three"};
9 //~^ ERROR this is a block expression, not an array
10
11 fn foo() {
12     {1, 2, 3};
13     //~^ ERROR this is a block expression, not an array
14 }
15
16 fn bar() {
17     1, 2, 3 //~ ERROR expected one of
18 }