1 // NB: If you change this test, change 'overlapping_marker_traits.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>()15 fn is_unpin<T: Unpin>() {}
16 
main()17 fn main() {
18     is_unpin::<Struct<PhantomPinned>>()
19 }
20