about summary refs log tree commit diff
path: root/tests/ui/extern/not-in-block.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/extern/not-in-block.rs')
-rw-r--r--tests/ui/extern/not-in-block.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/ui/extern/not-in-block.rs b/tests/ui/extern/not-in-block.rs
new file mode 100644
index 00000000000..d3bcafdef7b
--- /dev/null
+++ b/tests/ui/extern/not-in-block.rs
@@ -0,0 +1,6 @@
+#![crate_type = "lib"]
+
+extern fn none_fn(x: bool) -> i32;
+//~^ ERROR free function without a body
+extern "C" fn c_fn(x: bool) -> i32;
+//~^ ERROR free function without a body