aboutsummaryrefslogtreecommitdiff
path: root/tests/pinned_drop.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/pinned_drop.rs')
-rw-r--r--tests/pinned_drop.rs20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/pinned_drop.rs b/tests/pinned_drop.rs
index 9e7287d..785cea3 100644
--- a/tests/pinned_drop.rs
+++ b/tests/pinned_drop.rs
@@ -262,3 +262,23 @@ fn inside_macro() {
mac!(1);
}
+
+pub mod self_path {
+ use super::*;
+
+ #[pin_project(PinnedDrop)]
+ pub struct S<T: Unpin>(T);
+
+ fn f() {}
+
+ #[pinned_drop]
+ impl<T: Unpin> PinnedDrop for self::S<T> {
+ fn drop(mut self: Pin<&mut Self>) {
+ self::f();
+ let _: self::S<()> = self::S(());
+ let _: self::S<Pin<&mut Self>> = self::S(self.as_mut());
+ let self::S(()) = self::S(());
+ let self::S(&mut Self(_)) = self::S(&mut *self);
+ }
+ }
+}