rust/src/test/ui/parser/item-free-static-no-body-semantic-fail.rs
2021-03-06 08:21:08 +05:30

10 lines
292 B
Rust

// Semantically, a free `static` item cannot omit its body.
fn main() {}
static A: u8; //~ ERROR free static item without body
static B; //~ ERROR free static item without body
static mut C: u8; //~ ERROR free static item without body
static mut D; //~ ERROR free static item without body