1 use pin_project::{pin_project, UnsafeUnpin}; 2 3 #[pin_project(UnsafeUnpin, project = EnumProj, project_ref = EnumProjRef)] 4 enum Enum<T, U> { 5 Struct { 6 #[pin] 7 pinned: T, 8 unpinned: U, 9 }, 10 Tuple(#[pin] T, U), 11 Unit, 12 } 13 14 unsafe impl<T: Unpin, U> UnsafeUnpin for Enum<T, U> {} 15 main()16fn main() {} 17