diff options
Diffstat (limited to 'tests/expand/pinned_drop/enum.rs')
-rw-r--r-- | tests/expand/pinned_drop/enum.rs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/expand/pinned_drop/enum.rs b/tests/expand/pinned_drop/enum.rs new file mode 100644 index 0000000..1855cb7 --- /dev/null +++ b/tests/expand/pinned_drop/enum.rs @@ -0,0 +1,22 @@ +use pin_project_lite::pin_project; +use std::pin::Pin; + +pin_project! { + #[project = EnumProj] + #[project_ref = EnumProjRef] + enum Enum<T, U> { + Struct { + #[pin] + pinned: T, + unpinned: U, + }, + Unit, + } + impl<T, U> PinnedDrop for Enum<T, U> { + fn drop(this: Pin<&mut Self>) { + let _ = this; + } + } +} + +fn main() {} |