diff --git a/tests/source/extern.rs b/tests/source/extern.rs index 564c078ed2cd..2ef81f6fd1c5 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 d25dba7d1bb9..29751573d38b 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" {}