1error[E0277]: `PhantomPinned` cannot be unpinned
2  --> tests/ui/pin_project/add-pinned-field.rs:21:16
3   |
421 |     is_unpin::<Foo>(); //~ ERROR E0277
5   |                ^^^ within `__Foo<'_>`, the trait `Unpin` is not implemented for `PhantomPinned`
6   |
7   = note: consider using the `pin!` macro
8           consider using `Box::pin` if you need to access the pinned value outside of the current scope
9note: required because it appears within the type `__Foo<'_>`
10  --> tests/ui/pin_project/add-pinned-field.rs:8:8
11   |
128  | struct Foo {
13   |        ^^^
14note: required for `Foo` to implement `Unpin`
15  --> tests/ui/pin_project/add-pinned-field.rs:6:1
16   |
176  | #[pin_project]
18   | ^^^^^^^^^^^^^^ unsatisfied trait bound introduced in this `derive` macro
197  | #[add_pinned_field]
208  | struct Foo {
21   |        ^^^
22note: required by a bound in `is_unpin`
23  --> tests/ui/pin_project/add-pinned-field.rs:4:16
24   |
254  | fn is_unpin<T: Unpin>() {}
26   |                ^^^^^ required by this bound in `is_unpin`
27   = note: this error originates in the derive macro `::pin_project::__private::__PinProjectInternalDerive` (in Nightly builds, run with -Z macro-backtrace for more info)
28
29error[E0277]: `PhantomPinned` cannot be unpinned
30  --> tests/ui/pin_project/add-pinned-field.rs:22:16
31   |
3222 |     is_unpin::<Bar>(); //~ ERROR E0277
33   |                ^^^ within `__Bar<'_>`, the trait `Unpin` is not implemented for `PhantomPinned`
34   |
35   = note: consider using the `pin!` macro
36           consider using `Box::pin` if you need to access the pinned value outside of the current scope
37note: required because it appears within the type `__Bar<'_>`
38  --> tests/ui/pin_project/add-pinned-field.rs:15:8
39   |
4015 | struct Bar {
41   |        ^^^
42note: required for `Bar` to implement `Unpin`
43  --> tests/ui/pin_project/add-pinned-field.rs:14:1
44   |
4514 | #[pin_project]
46   | ^^^^^^^^^^^^^^ unsatisfied trait bound introduced in this `derive` macro
4715 | struct Bar {
48   |        ^^^
49note: required by a bound in `is_unpin`
50  --> tests/ui/pin_project/add-pinned-field.rs:4:16
51   |
524  | fn is_unpin<T: Unpin>() {}
53   |                ^^^^^ required by this bound in `is_unpin`
54   = note: this error originates in the derive macro `::pin_project::__private::__PinProjectInternalDerive` (in Nightly builds, run with -Z macro-backtrace for more info)
55