1 use pin_project::{pin_project, pinned_drop}; 2 use std::pin::Pin; 3 4 #[pin_project(PinnedDrop)] 5 struct Struct<T, U> { 6 #[pin] 7 pinned: T, 8 unpinned: U, 9 } 10 11 #[pinned_drop] 12 impl<T, U> PinnedDrop for Struct<T, U> { drop(self: Pin<&mut Self>)13 fn drop(self: Pin<&mut Self>) { 14 let _ = self; 15 } 16 } 17 main()18fn main() {} 19