| 1 |
error[E0277]: `PhantomPinned` cannot be unpinned |
| 2 |
--> tests/ui/pin_project/add-pinned-field.rs:21:16 |
| 3 |
| |
| 4 |
21 | 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 |
| 9 |
note: required because it appears within the type `__Foo<'_>` |
| 10 |
--> tests/ui/pin_project/add-pinned-field.rs:8:8 |
| 11 |
| |
| 12 |
8 | struct Foo { |
| 13 |
| ^^^ |
| 14 |
note: required for `Foo` to implement `Unpin` |
| 15 |
--> tests/ui/pin_project/add-pinned-field.rs:6:1 |
| 16 |
| |
| 17 |
6 | #[pin_project] |
| 18 |
| ^^^^^^^^^^^^^^ unsatisfied trait bound introduced in this `derive` macro |
| 19 |
7 | #[add_pinned_field] |
| 20 |
8 | struct Foo { |
| 21 |
| ^^^ |
| 22 |
note: required by a bound in `is_unpin` |
| 23 |
--> tests/ui/pin_project/add-pinned-field.rs:4:16 |
| 24 |
| |
| 25 |
4 | 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 |
|
| 29 |
error[E0277]: `PhantomPinned` cannot be unpinned |
| 30 |
--> tests/ui/pin_project/add-pinned-field.rs:22:16 |
| 31 |
| |
| 32 |
22 | 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 |
| 37 |
note: required because it appears within the type `__Bar<'_>` |
| 38 |
--> tests/ui/pin_project/add-pinned-field.rs:15:8 |
| 39 |
| |
| 40 |
15 | struct Bar { |
| 41 |
| ^^^ |
| 42 |
note: required for `Bar` to implement `Unpin` |
| 43 |
--> tests/ui/pin_project/add-pinned-field.rs:14:1 |
| 44 |
| |
| 45 |
14 | #[pin_project] |
| 46 |
| ^^^^^^^^^^^^^^ unsatisfied trait bound introduced in this `derive` macro |
| 47 |
15 | struct Bar { |
| 48 |
| ^^^ |
| 49 |
note: required by a bound in `is_unpin` |
| 50 |
--> tests/ui/pin_project/add-pinned-field.rs:4:16 |
| 51 |
| |
| 52 |
4 | 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) |