mirror of
https://gitee.com/openharmony/third_party_rust_cxx
synced 2024-11-23 07:10:29 +00:00
Add failing ui test showing unsafety of fn ptr not enforced
This commit is contained in:
parent
d6c1cb21f4
commit
b8682334c8
8
tests/ui/ptr_in_fnptr.rs
Normal file
8
tests/ui/ptr_in_fnptr.rs
Normal file
@ -0,0 +1,8 @@
|
||||
#[cxx::bridge]
|
||||
mod ffi {
|
||||
unsafe extern "C++" {
|
||||
fn f(callback: fn(p: *const u8));
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {}
|
Loading…
Reference in New Issue
Block a user