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