Debian Codegraph @

.cargo/vendor/cbindgen/tests/rust/manuallydrop.rs

raw
1 #[repr(C)]
2 pub struct Point {
3 x: i32,
4 y: i32,
5 }
6
7 #[repr(C)]
8 pub struct MyStruct {
9 point: std::mem::ManuallyDrop<Point>,
10 }
11
12 pub struct NotReprC<T> {
13 inner: T,
14 }
15
16 pub type Foo = NotReprC<std::mem::ManuallyDrop<Point>>;
17
18 #[no_mangle]
19 pub extern "C" fn root(a: &Foo, with_manual_drop: &MyStruct) {}
20
21 #[no_mangle]
22 pub extern "C" fn take(with_manual_drop: std::mem::ManuallyDrop<Point>) {}