rust/tests/ui/parser/foreign-static-semantic-fail.rs

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

9 lines
236 B
Rust
Raw Normal View History

// Syntactically, a foreign static may not have a body.
fn main() {}
2020-09-01 21:12:52 +00:00
extern "C" {
static X: u8 = 0; //~ ERROR incorrect `static` inside `extern` block
static mut Y: u8 = 0; //~ ERROR incorrect `static` inside `extern` block
}