1 use pin_project::{pin_project, pinned_drop};
2 use std::pin::Pin;
3
4 #[pin_project] //~ ERROR E0119
5 struct Foo<T, U> {
6 #[pin]
7 f1: T,
8 f2: U,
9 }
10
11 impl<T, U> Drop for Foo<T, U> {
drop(&mut self)12 fn drop(&mut self) {}
13 }
14
15 #[pin_project(PinnedDrop)] //~ ERROR E0119
16 struct Bar<T, U> {
17 #[pin]
18 f1: T,
19 f2: U,
20 }
21
22 #[pinned_drop]
23 impl<T, U> PinnedDrop for Bar<T, U> {
drop(self: Pin<&mut Self>)24 fn drop(self: Pin<&mut Self>) {}
25 }
26
27 impl<T, U> Drop for Bar<T, U> {
drop(&mut self)28 fn drop(&mut self) {}
29 }
30
main()31 fn main() {}
32