summaryrefslogtreecommitdiffstats
path: root/tests/ui/privacy/pub-extern-privacy.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/privacy/pub-extern-privacy.rs')
-rw-r--r--tests/ui/privacy/pub-extern-privacy.rs18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/ui/privacy/pub-extern-privacy.rs b/tests/ui/privacy/pub-extern-privacy.rs
new file mode 100644
index 000000000..dbbbe4e3b
--- /dev/null
+++ b/tests/ui/privacy/pub-extern-privacy.rs
@@ -0,0 +1,18 @@
+// run-pass
+// ignore-wasm32-bare no libc to test ffi with
+
+// pretty-expanded FIXME #23616
+
+use std::mem::transmute;
+
+mod a {
+ extern "C" {
+ pub fn free(x: *const u8);
+ }
+}
+
+pub fn main() {
+ unsafe {
+ a::free(transmute(0_usize));
+ }
+}