Files
another-boids-in-rust/vendor/pin-project/tests/ui/pinned_drop/conditional-drop-impl.stderr

35 lines
1.4 KiB
Plaintext

error[E0367]: `Drop` impl requires `T: Unpin` but the struct it is implemented for does not
--> tests/ui/pinned_drop/conditional-drop-impl.rs:13:9
|
13 | impl<T: Unpin> Drop for DropImpl<T> {
| ^^^^^
|
note: the implementor must specify the same requirement
--> tests/ui/pinned_drop/conditional-drop-impl.rs:9:1
|
9 | struct DropImpl<T> {
| ^^^^^^^^^^^^^^^^^^
error[E0277]: `T` cannot be unpinned
--> tests/ui/pinned_drop/conditional-drop-impl.rs:18:15
|
18 | #[pin_project(PinnedDrop)] //~ ERROR E0277
| ^^^^^^^^^^ the trait `Unpin` is not implemented for `T`
|
= note: consider using the `pin!` macro
consider using `Box::pin` if you need to access the pinned value outside of the current scope
note: required for `PinnedDropImpl<T>` to implement `PinnedDrop`
--> tests/ui/pinned_drop/conditional-drop-impl.rs:25:16
|
24 | #[pinned_drop]
| -------------- in this procedural macro expansion
25 | impl<T: Unpin> PinnedDrop for PinnedDropImpl<T> {
| ----- ^^^^^^^^^^ ^^^^^^^^^^^^^^^^^
| |
| unsatisfied trait bound introduced here
= note: this error originates in the attribute macro `pinned_drop` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider restricting type parameter `T` with trait `Unpin`
|
19 | struct PinnedDropImpl<T: std::marker::Unpin> {
| ++++++++++++++++++++