aboutsummaryrefslogtreecommitdiff
path: root/tests/expand/unsafe_unpin/struct.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/expand/unsafe_unpin/struct.rs')
-rw-r--r--tests/expand/unsafe_unpin/struct.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/expand/unsafe_unpin/struct.rs b/tests/expand/unsafe_unpin/struct.rs
new file mode 100644
index 0000000..b0851b1
--- /dev/null
+++ b/tests/expand/unsafe_unpin/struct.rs
@@ -0,0 +1,12 @@
+use pin_project::{pin_project, UnsafeUnpin};
+
+#[pin_project(UnsafeUnpin)]
+struct Struct<T, U> {
+ #[pin]
+ pinned: T,
+ unpinned: U,
+}
+
+unsafe impl<T: Unpin, U> UnsafeUnpin for Struct<T, U> {}
+
+fn main() {}