diff options
Diffstat (limited to 'tests/expand/naming/struct-all.expanded.rs')
-rw-r--r-- | tests/expand/naming/struct-all.expanded.rs | 39 |
1 files changed, 26 insertions, 13 deletions
diff --git a/tests/expand/naming/struct-all.expanded.rs b/tests/expand/naming/struct-all.expanded.rs index 4b46e34..e598a4f 100644 --- a/tests/expand/naming/struct-all.expanded.rs +++ b/tests/expand/naming/struct-all.expanded.rs @@ -1,5 +1,5 @@ use pin_project::pin_project; -# [pin (__private (project = Proj , project_ref = ProjRef , project_replace = ProjOwn))] +#[pin(__private(project = Proj, project_ref = ProjRef, project_replace = ProjOwn))] struct Struct<T, U> { #[pin] pinned: T, @@ -10,6 +10,7 @@ struct Struct<T, U> { #[allow(explicit_outlives_requirements)] #[allow(single_use_lifetimes)] #[allow(unreachable_pub)] +#[allow(unused_tuple_struct_fields)] #[allow(clippy::unknown_clippy_lints)] #[allow(clippy::pattern_type_mismatch)] #[allow(clippy::redundant_pub_crate)] @@ -28,6 +29,7 @@ where #[allow(explicit_outlives_requirements)] #[allow(single_use_lifetimes)] #[allow(unreachable_pub)] +#[allow(unused_tuple_struct_fields)] #[allow(clippy::unknown_clippy_lints)] #[allow(clippy::pattern_type_mismatch)] #[allow(clippy::redundant_pub_crate)] @@ -46,6 +48,7 @@ where #[allow(explicit_outlives_requirements)] #[allow(single_use_lifetimes)] #[allow(unreachable_pub)] +#[allow(unused_tuple_struct_fields)] #[allow(clippy::unknown_clippy_lints)] #[allow(clippy::pattern_type_mismatch)] #[allow(clippy::redundant_pub_crate)] @@ -60,6 +63,7 @@ struct ProjOwn<T, U> { #[allow(explicit_outlives_requirements)] #[allow(single_use_lifetimes)] #[allow(unreachable_pub)] +#[allow(unused_tuple_struct_fields)] #[allow(clippy::unknown_clippy_lints)] #[allow(clippy::pattern_type_mismatch)] #[allow(clippy::redundant_pub_crate)] @@ -72,7 +76,10 @@ const _: () = { #[allow(unused_extern_crates)] extern crate pin_project as _pin_project; impl<T, U> Struct<T, U> { - fn project<'pin>(self: _pin_project::__private::Pin<&'pin mut Self>) -> Proj<'pin, T, U> { + #[allow(dead_code)] + fn project<'pin>( + self: _pin_project::__private::Pin<&'pin mut Self>, + ) -> Proj<'pin, T, U> { unsafe { let Self { pinned, unpinned } = self.get_unchecked_mut(); Proj { @@ -81,6 +88,7 @@ const _: () = { } } } + #[allow(dead_code)] #[allow(clippy::missing_const_for_fn)] fn project_ref<'pin>( self: _pin_project::__private::Pin<&'pin Self>, @@ -93,21 +101,26 @@ const _: () = { } } } + #[allow(dead_code)] fn project_replace( self: _pin_project::__private::Pin<&mut Self>, __replacement: Self, ) -> ProjOwn<T, U> { unsafe { let __self_ptr: *mut Self = self.get_unchecked_mut(); - let __guard = - _pin_project::__private::UnsafeOverwriteGuard::new(__self_ptr, __replacement); + let __guard = _pin_project::__private::UnsafeOverwriteGuard::new( + __self_ptr, + __replacement, + ); let Self { pinned, unpinned } = &mut *__self_ptr; let __result = ProjOwn { pinned: _pin_project::__private::PhantomData, unpinned: _pin_project::__private::ptr::read(unpinned), }; { - let __guard = _pin_project::__private::UnsafeDropInPlaceGuard::new(pinned); + let __guard = _pin_project::__private::UnsafeDropInPlaceGuard::new( + pinned, + ); } __result } @@ -129,15 +142,15 @@ const _: () = { >, __field0: T, } - impl<'pin, T, U> _pin_project::__private::Unpin for Struct<T, U> where - __Struct<'pin, T, U>: _pin_project::__private::Unpin - { - } + impl<'pin, T, U> _pin_project::__private::Unpin for Struct<T, U> + where + __Struct<'pin, T, U>: _pin_project::__private::Unpin, + {} #[doc(hidden)] - unsafe impl<'pin, T, U> _pin_project::UnsafeUnpin for Struct<T, U> where - __Struct<'pin, T, U>: _pin_project::__private::Unpin - { - } + unsafe impl<'pin, T, U> _pin_project::UnsafeUnpin for Struct<T, U> + where + __Struct<'pin, T, U>: _pin_project::__private::Unpin, + {} trait StructMustNotImplDrop {} #[allow(clippy::drop_bounds, drop_bounds)] impl<T: _pin_project::__private::Drop> StructMustNotImplDrop for T {} |