summaryrefslogtreecommitdiffstats
path: root/tests/ui/parser/item-free-static-no-body-semantic-fail.rs
blob: 780479e3d26ac6eb4a76cb6e45155ce05fadf066 (plain)
1
2
3
4
5
6
7
8
9
10
11
// 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
//~^ ERROR missing type for `static` item

static mut C: u8; //~ ERROR free static item without body
static mut D; //~ ERROR free static item without body
//~^ ERROR missing type for `static mut` item