diff options
| author | topecongiro <seuchida@gmail.com> | 2020-06-30 11:34:05 +0900 |
|---|---|---|
| committer | Caleb Cartwright <calebcartwright@users.noreply.github.com> | 2020-11-28 21:59:30 -0600 |
| commit | 8e4622554737cc20ac452eed0d97cc398facff59 (patch) | |
| tree | da5cd899bd72e94d196c6580788e1abc113593c4 | |
| parent | 48d30a4f7105c1ae2be50a0620237cd3c9ded978 (diff) | |
| download | rust-8e4622554737cc20ac452eed0d97cc398facff59.tar.gz rust-8e4622554737cc20ac452eed0d97cc398facff59.zip | |
Add a test
| -rw-r--r-- | tests/source/extern.rs | 19 | ||||
| -rw-r--r-- | tests/target/extern.rs | 8 |
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" {} |
