1 use pin_project::{pin_project, UnsafeUnpin}; 2 3 #[pin_project(UnsafeUnpin)] 4 struct TupleStruct<T, U>(#[pin] T, U); 5 6 unsafe impl<T: Unpin, U> UnsafeUnpin for Struct<T, U> {} 7 main()8fn main() {} 9
1 use pin_project::{pin_project, UnsafeUnpin}; 2 3 #[pin_project(UnsafeUnpin)] 4 struct TupleStruct<T, U>(#[pin] T, U); 5 6 unsafe impl<T: Unpin, U> UnsafeUnpin for Struct<T, U> {} 7 main()8fn main() {} 9