use std::pin::Pin; use pin_project::{pin_project, pinned_drop}; // In `Drop` impl, the implementor must specify the same requirement as type definition. struct DropImpl { f: T, } impl Drop for DropImpl { //~^ ERROR E0367 fn drop(&mut self) {} } #[pin_project(PinnedDrop)] //~ ERROR E0277 struct PinnedDropImpl { #[pin] f: T, } #[pinned_drop] impl PinnedDrop for PinnedDropImpl { fn drop(self: Pin<&mut Self>) {} } fn main() {}