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