blob: 0587765709fcb8601d91e79bde4df380dd618769 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
error[E0367]: `Drop` impl requires `T: Unpin` but the struct it is implemented for does not
--> tests/ui/pinned_drop/conditional-drop-impl.rs:11:9
|
11 | impl<T: Unpin> Drop for DropImpl<T> {
| ^^^^^
|
note: the implementor must specify the same requirement
--> tests/ui/pinned_drop/conditional-drop-impl.rs:7:1
|
7 | struct DropImpl<T> {
| ^^^^^^^^^^^^^^^^^^
error[E0277]: `T` cannot be unpinned
--> tests/ui/pinned_drop/conditional-drop-impl.rs:16:15
|
16 | #[pin_project(PinnedDrop)] //~ ERROR E0277
| ^^^^^^^^^^ the trait `Unpin` is not implemented for `T`
|
= note: consider using `Box::pin`
note: required because of the requirements on the impl of `PinnedDrop` for `PinnedDropImpl<T>`
--> tests/ui/pinned_drop/conditional-drop-impl.rs:23:16
|
23 | impl<T: Unpin> PinnedDrop for PinnedDropImpl<T> {
| ^^^^^^^^^^ ^^^^^^^^^^^^^^^^^
help: consider restricting type parameter `T`
|
17 | struct PinnedDropImpl<T: std::marker::Unpin> {
| ++++++++++++++++++++
|