use pin_project::{pin_project, UnsafeUnpin}; #[pin_project] //~ ERROR E0119 struct Foo { #[pin] f1: T, f2: U, } unsafe impl UnsafeUnpin for Foo where T: Unpin {} #[pin_project] //~ ERROR E0119 struct Bar { #[pin] f1: T, f2: U, } unsafe impl UnsafeUnpin for Bar {} #[pin_project] //~ ERROR E0119 struct Baz { #[pin] f1: T, f2: U, } unsafe impl UnsafeUnpin for Baz {} fn main() {}