diff options
Diffstat (limited to 'src/test/ui/parser/foreign-static-semantic-fail.rs')
-rw-r--r-- | src/test/ui/parser/foreign-static-semantic-fail.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/test/ui/parser/foreign-static-semantic-fail.rs b/src/test/ui/parser/foreign-static-semantic-fail.rs new file mode 100644 index 000000000..3d427ed0e --- /dev/null +++ b/src/test/ui/parser/foreign-static-semantic-fail.rs @@ -0,0 +1,8 @@ +// Syntactically, a foreign static may not have a body. + +fn main() {} + +extern "C" { + static X: u8 = 0; //~ ERROR incorrect `static` inside `extern` block + static mut Y: u8 = 0; //~ ERROR incorrect `static` inside `extern` block +} |