diff options
Diffstat (limited to 'examples/unsafe_unpin-expanded.rs')
-rw-r--r-- | examples/unsafe_unpin-expanded.rs | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/examples/unsafe_unpin-expanded.rs b/examples/unsafe_unpin-expanded.rs index 7d8ad8e..e55b740 100644 --- a/examples/unsafe_unpin-expanded.rs +++ b/examples/unsafe_unpin-expanded.rs @@ -29,57 +29,60 @@ pub struct Struct<T, U> { } #[doc(hidden)] -#[allow(clippy::mut_mut)] // This lint warns `&mut &mut <ty>`. -#[allow(dead_code)] // This lint warns unused fields/variants. +#[allow(dead_code)] #[allow(single_use_lifetimes)] +#[allow(clippy::mut_mut)] +#[allow(clippy::type_repetition_in_bounds)] pub(crate) struct __StructProjection<'pin, T, U> where Struct<T, U>: 'pin, { - pinned: ::pin_project::__reexport::pin::Pin<&'pin mut (T)>, + pinned: ::pin_project::__private::Pin<&'pin mut (T)>, unpinned: &'pin mut (U), } #[doc(hidden)] -#[allow(dead_code)] // This lint warns unused fields/variants. +#[allow(dead_code)] #[allow(single_use_lifetimes)] +#[allow(clippy::type_repetition_in_bounds)] pub(crate) struct __StructProjectionRef<'pin, T, U> where Struct<T, U>: 'pin, { - pinned: ::pin_project::__reexport::pin::Pin<&'pin (T)>, + pinned: ::pin_project::__private::Pin<&'pin (T)>, unpinned: &'pin (U), } #[doc(hidden)] #[allow(non_upper_case_globals)] #[allow(single_use_lifetimes)] -const __SCOPE_Struct: () = { +#[allow(clippy::used_underscore_binding)] +const _: () = { impl<T, U> Struct<T, U> { pub(crate) fn project<'pin>( - self: ::pin_project::__reexport::pin::Pin<&'pin mut Self>, + self: ::pin_project::__private::Pin<&'pin mut Self>, ) -> __StructProjection<'pin, T, U> { unsafe { let Self { pinned, unpinned } = self.get_unchecked_mut(); __StructProjection { - pinned: ::pin_project::__reexport::pin::Pin::new_unchecked(pinned), + pinned: ::pin_project::__private::Pin::new_unchecked(pinned), unpinned, } } } pub(crate) fn project_ref<'pin>( - self: ::pin_project::__reexport::pin::Pin<&'pin Self>, + self: ::pin_project::__private::Pin<&'pin Self>, ) -> __StructProjectionRef<'pin, T, U> { unsafe { let Self { pinned, unpinned } = self.get_ref(); __StructProjectionRef { - pinned: ::pin_project::__reexport::pin::Pin::new_unchecked(pinned), + pinned: ::pin_project::__private::Pin::new_unchecked(pinned), unpinned, } } } } - impl<'pin, T, U> ::pin_project::__reexport::marker::Unpin for Struct<T, U> where + impl<'pin, T, U> ::pin_project::__private::Unpin for Struct<T, U> where ::pin_project::__private::Wrapper<'pin, Self>: ::pin_project::UnsafeUnpin { } @@ -89,13 +92,14 @@ const __SCOPE_Struct: () = { // See ./struct-default-expanded.rs for details. trait StructMustNotImplDrop {} #[allow(clippy::drop_bounds)] - impl<T: ::pin_project::__reexport::ops::Drop> StructMustNotImplDrop for T {} + impl<T: ::pin_project::__private::Drop> StructMustNotImplDrop for T {} impl<T, U> StructMustNotImplDrop for Struct<T, U> {} impl<T, U> ::pin_project::__private::PinnedDrop for Struct<T, U> { - unsafe fn drop(self: ::pin_project::__reexport::pin::Pin<&mut Self>) {} + unsafe fn drop(self: ::pin_project::__private::Pin<&mut Self>) {} } - // Ensure that it's impossible to use pin projections on a #[repr(packed)] struct. + // Ensure that it's impossible to use pin projections on a #[repr(packed)] + // struct. // // See ./struct-default-expanded.rs and https://github.com/taiki-e/pin-project/pull/34 // for details. |