]> git.lizzy.rs Git - rust.git/blob - src/test/ui/did_you_mean/issue-87830-try-brackets-for-arrays.rs
Test `expect` with `forbid` and fix doc errors (RFC-2383)
[rust.git] / src / test / ui / did_you_mean / issue-87830-try-brackets-for-arrays.rs
1 fn main() {}
2
3 const FOO: [u8; 3] = { //~ ERROR this code is interpreted as a block expression
4     1, 2, 3
5 };
6
7 const BAR: [&str; 3] = {"one", "two", "three"};
8 //~^ ERROR this code is interpreted as a block expression
9
10 fn foo() {
11     {1, 2, 3};
12     //~^ ERROR this code is interpreted as a block expression
13 }
14
15 fn bar() {
16     1, 2, 3 //~ ERROR expected one of
17 }