1 use pin_project::pin_project; 2 use std::marker::PhantomPinned; 3 4 #[pin_project] 5 struct S<T> { 6 #[pin] 7 f: T, 8 } 9 10 struct __S {} 11 12 impl Unpin for __S {} 13 is_unpin<T: Unpin>()14fn is_unpin<T: Unpin>() {} 15 main()16fn main() { 17 is_unpin::<S<PhantomPinned>>(); //~ ERROR E0277 18 } 19