Add failing ui test showing unsafety of fn ptr not enforced

This commit is contained in:
David Tolnay 2021-03-22 16:53:15 -07:00
parent d6c1cb21f4
commit b8682334c8
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82

8
tests/ui/ptr_in_fnptr.rs Normal file
View File

@ -0,0 +1,8 @@
#[cxx::bridge]
mod ffi {
unsafe extern "C++" {
fn f(callback: fn(p: *const u8));
}
}
fn main() {}