• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1error[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   |
411 | impl<T: Unpin> Drop for DropImpl<T> {
5   |         ^^^^^
6   |
7note: the implementor must specify the same requirement
8  --> tests/ui/pinned_drop/conditional-drop-impl.rs:7:1
9   |
107  | / struct DropImpl<T> {
118  | |     f: T,
129  | | }
13   | |_^
14
15error[E0277]: `T` cannot be unpinned
16  --> tests/ui/pinned_drop/conditional-drop-impl.rs:16:15
17   |
1816 | #[pin_project(PinnedDrop)] //~ ERROR E0277
19   |               ^^^^^^^^^^ the trait `Unpin` is not implemented for `T`
20   |
21   = note: consider using `Box::pin`
22note: required because of the requirements on the impl of `PinnedDrop` for `PinnedDropImpl<T>`
23  --> tests/ui/pinned_drop/conditional-drop-impl.rs:23:16
24   |
2523 | impl<T: Unpin> PinnedDrop for PinnedDropImpl<T> {
26   |                ^^^^^^^^^^     ^^^^^^^^^^^^^^^^^
27help: consider restricting type parameter `T`
28   |
2917 | struct PinnedDropImpl<T: std::marker::Unpin> {
30   |                        ++++++++++++++++++++
31