mirror of
https://github.com/rust-lang/rust
synced 2024-09-06 01:11:17 +00:00
19 lines
346 B
Rust
19 lines
346 B
Rust
fn main() {}
|
|
|
|
const FOO: [u8; 3] = {
|
|
//~^ ERROR this is a block expression, not an array
|
|
1, 2, 3
|
|
};
|
|
|
|
const BAR: [&str; 3] = {"one", "two", "three"};
|
|
//~^ ERROR this is a block expression, not an array
|
|
|
|
fn foo() {
|
|
{1, 2, 3};
|
|
//~^ ERROR this is a block expression, not an array
|
|
}
|
|
|
|
fn bar() {
|
|
1, 2, 3 //~ ERROR expected one of
|
|
}
|