error[E0277]: `PhantomPinned` cannot be unpinned --> tests/ui/pin_project/overlapping_unpin_struct.rs:20:16 | 20 | is_unpin::>(); //~ ERROR E0277 | ^^^^^^^^^^^^^^^^ within `_::__S<'_, PhantomPinned>`, the trait `Unpin` is not implemented for `PhantomPinned`, which is required by `S: 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 `_::__S<'_, PhantomPinned>` --> tests/ui/pin_project/overlapping_unpin_struct.rs:8:8 | 8 | struct S { | ^ note: required for `S` to implement `Unpin` --> tests/ui/pin_project/overlapping_unpin_struct.rs:7:1 | 7 | #[pin_project] | ^^^^^^^^^^^^^^ unsatisfied trait bound introduced in this `derive` macro 8 | struct S { | ^^^^ note: required by a bound in `is_unpin` --> tests/ui/pin_project/overlapping_unpin_struct.rs:17:16 | 17 | fn is_unpin() {} | ^^^^^ required by this bound in `is_unpin` = note: this error originates in the derive macro `::pin_project::__private::__PinProjectInternalDerive` (in Nightly builds, run with -Z macro-backtrace for more info)