Debian Codegraph @

third_party/rust/pin-project/tests/ui/pinned_drop/conditional-drop-impl.stderr

raw
1 error[E0367]: `Drop` impl requires `T: Unpin` but the struct it is implemented for does not
2 --> tests/ui/pinned_drop/conditional-drop-impl.rs:11:9
3 |
4 11 | impl<T: Unpin> Drop for DropImpl<T> {
5 | ^^^^^
6 |
7 note: the implementor must specify the same requirement
8 --> tests/ui/pinned_drop/conditional-drop-impl.rs:7:1
9 |
10 7 | struct DropImpl<T> {
11 | ^^^^^^^^^^^^^^^^^^
12
13 error[E0277]: `T` cannot be unpinned
14 --> tests/ui/pinned_drop/conditional-drop-impl.rs:16:15
15 |
16 16 | #[pin_project(PinnedDrop)] //~ ERROR E0277
17 | ^^^^^^^^^^ the trait `Unpin` is not implemented for `T`
18 |
19 = note: consider using the `pin!` macro
20 consider using `Box::pin` if you need to access the pinned value outside of the current scope
21 note: required for `PinnedDropImpl<T>` to implement `PinnedDrop`
22 --> tests/ui/pinned_drop/conditional-drop-impl.rs:23:16
23 |
24 23 | impl<T: Unpin> PinnedDrop for PinnedDropImpl<T> {
25 | ----- ^^^^^^^^^^ ^^^^^^^^^^^^^^^^^
26 | |
27 | unsatisfied trait bound introduced here
28 help: consider restricting type parameter `T`
29 |
30 17 | struct PinnedDropImpl<T: std::marker::Unpin> {
31 | ++++++++++++++++++++