summaryrefslogtreecommitdiffstats
path: root/src/test/ui/extern/extern-ffi-fn-with-body.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/extern/extern-ffi-fn-with-body.rs')
-rw-r--r--src/test/ui/extern/extern-ffi-fn-with-body.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/ui/extern/extern-ffi-fn-with-body.rs b/src/test/ui/extern/extern-ffi-fn-with-body.rs
new file mode 100644
index 000000000..ef234e8af
--- /dev/null
+++ b/src/test/ui/extern/extern-ffi-fn-with-body.rs
@@ -0,0 +1,11 @@
+extern "C" {
+ fn foo() -> i32 { //~ ERROR incorrect function inside `extern` block
+ return 0;
+ }
+}
+
+extern "C" fn bar() -> i32 {
+ return 0;
+}
+
+fn main() {}