• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 use pin_project::{pin_project, UnsafeUnpin};
2 
3 #[pin_project] //~ ERROR E0119
4 struct Foo<T, U> {
5     #[pin]
6     f1: T,
7     f2: U,
8 }
9 
10 unsafe impl<T, U> UnsafeUnpin for Foo<T, U> where T: Unpin {}
11 
12 #[pin_project] //~ ERROR E0119
13 struct Bar<T, U> {
14     #[pin]
15     f1: T,
16     f2: U,
17 }
18 
19 unsafe impl<T, U> UnsafeUnpin for Bar<T, U> {}
20 
21 #[pin_project] //~ ERROR E0119
22 struct Baz<T, U> {
23     #[pin]
24     f1: T,
25     f2: U,
26 }
27 
28 unsafe impl<T: Unpin, U: Unpin> UnsafeUnpin for Baz<T, U> {}
29 
main()30 fn main() {}
31