error[E0277]: `PhantomPinned` cannot be unpinned --> tests/ui/pin_project/overlapping_unpin_struct.rs:21:16 | 21 | is_unpin::>(); //~ ERROR E0277 | ^^^^^^^^^^^^^^^^^^ within `_::__Origin<'_, PhantomPinned>`, the trait `Unpin` is not implemented for `PhantomPinned`, which is required by `Foo: Unpin` | = note: consider using the `pin!` macro consider using `Box::pin` if you need to access the pinned value outside of the current scope note: required because it appears within the type `_::__Origin<'_, PhantomPinned>` --> tests/ui/pin_project/overlapping_unpin_struct.rs:7:1 | 7 | / pin_project! { 8 | | struct Foo { 9 | | #[pin] 10 | | inner: T, 11 | | } 12 | | } | |_^ note: required for `Foo` to implement `Unpin` --> tests/ui/pin_project/overlapping_unpin_struct.rs:7:1 | 7 | / pin_project! { 8 | | struct Foo { 9 | | #[pin] 10 | | inner: T, 11 | | } 12 | | } | |_^ unsatisfied trait bound introduced here note: required by a bound in `is_unpin` --> tests/ui/pin_project/overlapping_unpin_struct.rs:18:16 | 18 | fn is_unpin() {} | ^^^^^ required by this bound in `is_unpin` = note: this error originates in the macro `$crate::__pin_project_make_unpin_impl` which comes from the expansion of the macro `pin_project` (in Nightly builds, run with -Z macro-backtrace for more info)