Debian Codegraph @

third_party/rust/pin-project/tests/ui/pin_project/overlapping_unpin_struct.stderr

raw
1 error[E0277]: `PhantomPinned` cannot be unpinned
2 --> tests/ui/pin_project/overlapping_unpin_struct.rs:18:16
3 |
4 18 | is_unpin::<S<PhantomPinned>>(); //~ ERROR E0277
5 | ^^^^^^^^^^^^^^^^ within `_::__S<'_, PhantomPinned>`, 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 `__S<'_, PhantomPinned>`
10 --> tests/ui/pin_project/overlapping_unpin_struct.rs:6:8
11 |
12 6 | struct S<T> {
13 | ^
14 note: required for `S<PhantomPinned>` to implement `Unpin`
15 --> tests/ui/pin_project/overlapping_unpin_struct.rs:5:1
16 |
17 5 | #[pin_project]
18 | ^^^^^^^^^^^^^^ unsatisfied trait bound introduced in this `derive` macro
19 6 | struct S<T> {
20 | ^^^^
21 note: required by a bound in `is_unpin`
22 --> tests/ui/pin_project/overlapping_unpin_struct.rs:15:16
23 |
24 15 | 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)