rust/tests/ui/parser/item-free-const-no-body-semantic-fail.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

8 lines
221 B
Rust
Raw Normal View History

// 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
2021-10-06 00:52:45 +00:00
//~^ ERROR missing type for `const` item