pin_project_internal::pin_project::derive

Function make_unpin_impl

source
fn make_unpin_impl(cx: &Context<'_>) -> TokenStream
Expand description

Creates Unpin implementation for the original type.

The kind of Unpin impl generated depends on unpin_impl field:

  • UnpinImpl::Unsafe - Implements Unpin via UnsafeUnpin impl.
  • UnpinImpl::Negative - Generates Unpin impl with bounds that will never be true.
  • UnpinImpl::Default - Generates Unpin impl that requires Unpin for all pinned fields.