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