diff options
Diffstat (limited to 'tests/rust/nonnull.rs')
-rw-r--r-- | tests/rust/nonnull.rs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/rust/nonnull.rs b/tests/rust/nonnull.rs new file mode 100644 index 0000000..5e07c35 --- /dev/null +++ b/tests/rust/nonnull.rs @@ -0,0 +1,19 @@ +use std::ptr::NonNull; + +struct Opaque; + +#[repr(C)] +pub struct Foo<T> { + a: NonNull<f32>, + b: NonNull<T>, + c: NonNull<Opaque>, + d: NonNull<NonNull<T>>, + e: NonNull<NonNull<f32>>, + f: NonNull<NonNull<Opaque>>, + g: Option<NonNull<T>>, + h: Option<NonNull<i32>>, + i: Option<NonNull<NonNull<i32>>>, +} + +#[no_mangle] +pub extern "C" fn root(arg: NonNull<i32>, foo: *mut Foo<u64>, d: NonNull<NonNull<Opaque>>) { } |