1 // NB: If you change this test, change 'marker_trait_attr.rs' at the same time. 2 3 use pin_project::pin_project; 4 use std::marker::PhantomPinned; 5 6 #[pin_project] //~ ERROR E0119 7 struct Struct<T> { 8 #[pin] 9 x: T, 10 } 11 12 // unsound Unpin impl 13 impl<T> Unpin for Struct<T> {} 14 is_unpin<T: Unpin>()15fn is_unpin<T: Unpin>() {} 16 main()17fn main() { 18 is_unpin::<Struct<PhantomPinned>>() 19 } 20