summaryrefslogtreecommitdiffstats
path: root/src/test/ui/parser/item-free-const-no-body-semantic-fail.rs
blob: 613b3c9856171a28f10cfdd856d7aaf8f15ba693 (plain)
1
2
3
4
5
6
7
// 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