• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1error[E0277]: `PhantomPinned` cannot be unpinned
2  --> tests/ui/pin_project/overlapping_unpin_struct.rs:18:5
3   |
418 |     is_unpin::<S<PhantomPinned>>(); //~ ERROR E0277
5   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ within `_::__S<'_, PhantomPinned>`, the trait `Unpin` is not implemented for `PhantomPinned`
6   |
7   = note: consider using `Box::pin`
8note: required because it appears within the type `_::__S<'_, PhantomPinned>`
9  --> tests/ui/pin_project/overlapping_unpin_struct.rs:6:8
10   |
116  | struct S<T> {
12   |        ^
13note: required because of the requirements on the impl of `Unpin` for `S<PhantomPinned>`
14  --> tests/ui/pin_project/overlapping_unpin_struct.rs:5:1
15   |
165  | #[pin_project]
17   | ^^^^^^^^^^^^^^
186  | struct S<T> {
19   |        ^^^^
20note: required by a bound in `is_unpin`
21  --> tests/ui/pin_project/overlapping_unpin_struct.rs:15:16
22   |
2315 | fn is_unpin<T: Unpin>() {}
24   |                ^^^^^ required by this bound in `is_unpin`
25   = note: this error originates in the derive macro `::pin_project::__private::__PinProjectInternalDerive` (in Nightly builds, run with -Z macro-backtrace for more info)
26