|
| 1 | +error[E0277]: the trait bound `Pin<&MyUnpinType>: DerefMut` is not satisfied |
| 2 | + --> $DIR/pin-impl-deref.rs:24:20 |
| 3 | + | |
| 4 | +LL | impl_deref_mut(r_unpin) |
| 5 | + | -------------- ^^^^^^^ the trait `DerefMut` is not implemented for `Pin<&MyUnpinType>` |
| 6 | + | | |
| 7 | + | required by a bound introduced by this call |
| 8 | + | |
| 9 | + = note: required for `Pin<&MyUnpinType>` to implement `DerefMut` |
| 10 | +note: required by a bound in `impl_deref_mut` |
| 11 | + --> $DIR/pin-impl-deref.rs:22:27 |
| 12 | + | |
| 13 | +LL | fn impl_deref_mut(_: impl DerefMut) {} |
| 14 | + | ^^^^^^^^ required by this bound in `impl_deref_mut` |
| 15 | +help: consider mutably borrowing here |
| 16 | + | |
| 17 | +LL | impl_deref_mut(&mut r_unpin) |
| 18 | + | ++++ |
| 19 | + |
| 20 | +error[E0277]: the trait bound `Pin<&MyPinType>: DerefMut` is not satisfied |
| 21 | + --> $DIR/pin-impl-deref.rs:31:20 |
| 22 | + | |
| 23 | +LL | impl_deref_mut(r_pin) |
| 24 | + | -------------- ^^^^^ the trait `DerefMut` is not implemented for `Pin<&MyPinType>` |
| 25 | + | | |
| 26 | + | required by a bound introduced by this call |
| 27 | + | |
| 28 | + = note: required for `Pin<&MyPinType>` to implement `DerefMut` |
| 29 | +note: required by a bound in `impl_deref_mut` |
| 30 | + --> $DIR/pin-impl-deref.rs:22:27 |
| 31 | + | |
| 32 | +LL | fn impl_deref_mut(_: impl DerefMut) {} |
| 33 | + | ^^^^^^^^ required by this bound in `impl_deref_mut` |
| 34 | +help: consider mutably borrowing here |
| 35 | + | |
| 36 | +LL | impl_deref_mut(&mut r_pin) |
| 37 | + | ++++ |
| 38 | + |
| 39 | +error[E0277]: `PhantomPinned` cannot be unpinned |
| 40 | + --> $DIR/pin-impl-deref.rs:31:20 |
| 41 | + | |
| 42 | +LL | impl_deref_mut(r_pin) |
| 43 | + | -------------- ^^^^^ within `MyPinType`, the trait `Unpin` is not implemented for `PhantomPinned` |
| 44 | + | | |
| 45 | + | required by a bound introduced by this call |
| 46 | + | |
| 47 | + = note: consider using the `pin!` macro |
| 48 | + consider using `Box::pin` if you need to access the pinned value outside of the current scope |
| 49 | +note: required because it appears within the type `MyPinType` |
| 50 | + --> $DIR/pin-impl-deref.rs:15:8 |
| 51 | + | |
| 52 | +LL | struct MyPinType(core::marker::PhantomPinned); |
| 53 | + | ^^^^^^^^^ |
| 54 | + = note: required for `Pin<&MyPinType>` to implement `DerefMut` |
| 55 | +note: required by a bound in `impl_deref_mut` |
| 56 | + --> $DIR/pin-impl-deref.rs:22:27 |
| 57 | + | |
| 58 | +LL | fn impl_deref_mut(_: impl DerefMut) {} |
| 59 | + | ^^^^^^^^ required by this bound in `impl_deref_mut` |
| 60 | + |
| 61 | +error[E0277]: `PhantomPinned` cannot be unpinned |
| 62 | + --> $DIR/pin-impl-deref.rs:36:20 |
| 63 | + | |
| 64 | +LL | impl_deref_mut(r_pin) |
| 65 | + | -------------- ^^^^^ within `MyPinType`, the trait `Unpin` is not implemented for `PhantomPinned` |
| 66 | + | | |
| 67 | + | required by a bound introduced by this call |
| 68 | + | |
| 69 | + = note: consider using the `pin!` macro |
| 70 | + consider using `Box::pin` if you need to access the pinned value outside of the current scope |
| 71 | +note: required because it appears within the type `MyPinType` |
| 72 | + --> $DIR/pin-impl-deref.rs:15:8 |
| 73 | + | |
| 74 | +LL | struct MyPinType(core::marker::PhantomPinned); |
| 75 | + | ^^^^^^^^^ |
| 76 | + = note: required for `Pin<&mut MyPinType>` to implement `DerefMut` |
| 77 | +note: required by a bound in `impl_deref_mut` |
| 78 | + --> $DIR/pin-impl-deref.rs:22:27 |
| 79 | + | |
| 80 | +LL | fn impl_deref_mut(_: impl DerefMut) {} |
| 81 | + | ^^^^^^^^ required by this bound in `impl_deref_mut` |
| 82 | + |
| 83 | +error: aborting due to 4 previous errors |
| 84 | + |
| 85 | +For more information about this error, try `rustc --explain E0277`. |
0 commit comments