about summary refs log tree commit diff
diff options
context:
space:
mode:
authortopecongiro <seuchida@gmail.com>2020-06-30 11:34:05 +0900
committerCaleb Cartwright <calebcartwright@users.noreply.github.com>2020-11-28 21:59:30 -0600
commit8e4622554737cc20ac452eed0d97cc398facff59 (patch)
treeda5cd899bd72e94d196c6580788e1abc113593c4
parent48d30a4f7105c1ae2be50a0620237cd3c9ded978 (diff)
downloadrust-8e4622554737cc20ac452eed0d97cc398facff59.tar.gz
rust-8e4622554737cc20ac452eed0d97cc398facff59.zip
Add a test
-rw-r--r--tests/source/extern.rs19
-rw-r--r--tests/target/extern.rs8
2 files changed, 27 insertions, 0 deletions
diff --git a/tests/source/extern.rs b/tests/source/extern.rs
index 564c078ed2c..2ef81f6fd1c 100644
--- a/tests/source/extern.rs
+++ b/tests/source/extern.rs
@@ -58,6 +58,25 @@ libc::c_long;
                                , mode3: *const c_char,
                                file: *mut FILE)
                               -> *mut FILE;
+
+
+       async fn foo(
+
+       ) -> *mut
+       Bar;
+       const fn foo(
+
+       ) ->
+                            *mut Bar;
+       unsafe fn foo(
+
+       ) -> *
+       mut
+       Bar;
+
+       pub async fn foo() -> *mut Bar;
+       pub(super) const fn foo() -> *mut Bar;
+       pub(crate) unsafe fn foo() -> *mut Bar;
    }
 
 extern {
diff --git a/tests/target/extern.rs b/tests/target/extern.rs
index d25dba7d1bb..29751573d38 100644
--- a/tests/target/extern.rs
+++ b/tests/target/extern.rs
@@ -73,6 +73,14 @@ extern "C" {
         mode3: *const c_char,
         file: *mut FILE,
     ) -> *mut FILE;
+
+    async fn foo() -> *mut Bar;
+    const fn foo() -> *mut Bar;
+    unsafe fn foo() -> *mut Bar;
+
+    pub async fn foo() -> *mut Bar;
+    pub(super) const fn foo() -> *mut Bar;
+    pub(crate) unsafe fn foo() -> *mut Bar;
 }
 
 extern "C" {}