diff options
Diffstat (limited to 'examples/enum-default-expanded.rs')
-rw-r--r-- | examples/enum-default-expanded.rs | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/examples/enum-default-expanded.rs b/examples/enum-default-expanded.rs index 845645a..3e7cb3c 100644 --- a/examples/enum-default-expanded.rs +++ b/examples/enum-default-expanded.rs @@ -15,7 +15,7 @@ // ``` #![allow(dead_code, unused_imports, unused_parens)] -#![allow(clippy::no_effect, clippy::just_underscores_and_digits)] +#![allow(clippy::just_underscores_and_digits)] use pin_project::pin_project; @@ -24,51 +24,54 @@ enum Enum<T, U> { Unpinned(U), } -#[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)] enum EnumProj<'pin, T, U> where Enum<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)] enum __EnumProjectionRef<'pin, T, U> where Enum<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_Enum: () = { +#[allow(clippy::used_underscore_binding)] +const _: () = { impl<T, U> Enum<T, U> { fn project<'pin>( - self: ::pin_project::__reexport::pin::Pin<&'pin mut Self>, + self: ::pin_project::__private::Pin<&'pin mut Self>, ) -> EnumProj<'pin, T, U> { unsafe { match self.get_unchecked_mut() { Enum::Pinned(_0) => { - EnumProj::Pinned(::pin_project::__reexport::pin::Pin::new_unchecked(_0)) + EnumProj::Pinned(::pin_project::__private::Pin::new_unchecked(_0)) } Enum::Unpinned(_0) => EnumProj::Unpinned(_0), } } } fn project_ref<'pin>( - self: ::pin_project::__reexport::pin::Pin<&'pin Self>, + self: ::pin_project::__private::Pin<&'pin Self>, ) -> __EnumProjectionRef<'pin, T, U> { unsafe { match self.get_ref() { Enum::Pinned(_0) => __EnumProjectionRef::Pinned( - ::pin_project::__reexport::pin::Pin::new_unchecked(_0), + ::pin_project::__private::Pin::new_unchecked(_0), ), Enum::Unpinned(_0) => __EnumProjectionRef::Unpinned(_0), } @@ -84,8 +87,8 @@ const __SCOPE_Enum: () = { __pin_project_use_generics: ::pin_project::__private::AlwaysUnpin<'pin, (T, U)>, __field0: T, } - impl<'pin, T, U> ::pin_project::__reexport::marker::Unpin for Enum<T, U> where - __Enum<'pin, T, U>: ::pin_project::__reexport::marker::Unpin + impl<'pin, T, U> ::pin_project::__private::Unpin for Enum<T, U> where + __Enum<'pin, T, U>: ::pin_project::__private::Unpin { } unsafe impl<T, U> ::pin_project::UnsafeUnpin for Enum<T, U> {} @@ -95,10 +98,10 @@ const __SCOPE_Enum: () = { // See ./struct-default-expanded.rs for details. trait EnumMustNotImplDrop {} #[allow(clippy::drop_bounds)] - impl<T: ::pin_project::__reexport::ops::Drop> EnumMustNotImplDrop for T {} + impl<T: ::pin_project::__private::Drop> EnumMustNotImplDrop for T {} impl<T, U> EnumMustNotImplDrop for Enum<T, U> {} impl<T, U> ::pin_project::__private::PinnedDrop for Enum<T, U> { - unsafe fn drop(self: ::pin_project::__reexport::pin::Pin<&mut Self>) {} + unsafe fn drop(self: ::pin_project::__private::Pin<&mut Self>) {} } // We don't need to check for `#[repr(packed)]`, |