rust/tests/ui/parser/item-free-const-no-body-semantic-fail.rs
2023-01-11 09:32:08 +00:00

8 lines
221 B
Rust

// Semantically, a free `const` item cannot omit its body.
fn main() {}
const A: u8; //~ ERROR free constant item without body
const B; //~ ERROR free constant item without body
//~^ ERROR missing type for `const` item