1error[E0277]: `PhantomPinned` cannot be unpinned 2 --> tests/ui/pin_project/add-pinned-field.rs:21:5 3 | 421 | is_unpin::<Foo>(); //~ ERROR E0277 5 | ^^^^^^^^^^^^^^^ within `__Foo<'_>`, the trait `Unpin` is not implemented for `PhantomPinned` 6 | 7 = note: consider using `Box::pin` 8note: required because it appears within the type `__Foo<'_>` 9 --> tests/ui/pin_project/add-pinned-field.rs:8:8 10 | 118 | struct Foo { 12 | ^^^ 13note: required because of the requirements on the impl of `Unpin` for `Foo` 14 --> tests/ui/pin_project/add-pinned-field.rs:6:1 15 | 166 | #[pin_project] 17 | ^^^^^^^^^^^^^^ 187 | #[add_pinned_field] 198 | struct Foo { 20 | ^^^ 21note: required by a bound in `is_unpin` 22 --> tests/ui/pin_project/add-pinned-field.rs:4:16 23 | 244 | fn is_unpin<T: Unpin>() {} 25 | ^^^^^ required by this bound in `is_unpin` 26 = note: this error originates in the derive macro `::pin_project::__private::__PinProjectInternalDerive` (in Nightly builds, run with -Z macro-backtrace for more info) 27 28error[E0277]: `PhantomPinned` cannot be unpinned 29 --> tests/ui/pin_project/add-pinned-field.rs:22:5 30 | 3122 | is_unpin::<Bar>(); //~ ERROR E0277 32 | ^^^^^^^^^^^^^^^ within `__Bar<'_>`, the trait `Unpin` is not implemented for `PhantomPinned` 33 | 34 = note: consider using `Box::pin` 35note: required because it appears within the type `__Bar<'_>` 36 --> tests/ui/pin_project/add-pinned-field.rs:15:8 37 | 3815 | struct Bar { 39 | ^^^ 40note: required because of the requirements on the impl of `Unpin` for `Bar` 41 --> tests/ui/pin_project/add-pinned-field.rs:14:1 42 | 4314 | #[pin_project] 44 | ^^^^^^^^^^^^^^ 4515 | struct Bar { 46 | ^^^ 47note: required by a bound in `is_unpin` 48 --> tests/ui/pin_project/add-pinned-field.rs:4:16 49 | 504 | fn is_unpin<T: Unpin>() {} 51 | ^^^^^ required by this bound in `is_unpin` 52 = note: this error originates in the derive macro `::pin_project::__private::__PinProjectInternalDerive` (in Nightly builds, run with -Z macro-backtrace for more info) 53