]> git.proxmox.com Git - rustc.git/blob - src/test/ui/did_you_mean/issue-87830-try-brackets-for-arrays.rs
New upstream version 1.61.0+dfsg1
[rustc.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 }