• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1error[E0277]: `PhantomPinned` cannot be unpinned
2  --> tests/ui/pin_project/overlapping_unpin_struct.rs:19:5
3   |
419 |     is_unpin::<Foo<PhantomPinned>>(); //~ ERROR E0277
5   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ within `_::__Origin<'_, PhantomPinned>`, the trait `Unpin` is not implemented for `PhantomPinned`
6   |
7   = note: consider using `Box::pin`
8note: required because it appears within the type `_::__Origin<'_, PhantomPinned>`
9  --> tests/ui/pin_project/overlapping_unpin_struct.rs:5:1
10   |
115  | / pin_project! {
126  | |     struct Foo<T> {
137  | |         #[pin]
148  | |         inner: T,
159  | |     }
1610 | | }
17   | |_^
18note: required because of the requirements on the impl of `Unpin` for `Foo<PhantomPinned>`
19  --> tests/ui/pin_project/overlapping_unpin_struct.rs:5:1
20   |
215  | / pin_project! {
226  | |     struct Foo<T> {
237  | |         #[pin]
248  | |         inner: T,
259  | |     }
2610 | | }
27   | |_^
28note: required by a bound in `is_unpin`
29  --> tests/ui/pin_project/overlapping_unpin_struct.rs:16:16
30   |
3116 | fn is_unpin<T: Unpin>() {}
32   |                ^^^^^ required by this bound in `is_unpin`
33   = note: this error originates in the macro `$crate::__pin_project_make_unpin_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
34