diff options
Diffstat (limited to 'tests/expand/unsafe_unpin/tuple_struct.expanded.rs')
-rw-r--r-- | tests/expand/unsafe_unpin/tuple_struct.expanded.rs | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/tests/expand/unsafe_unpin/tuple_struct.expanded.rs b/tests/expand/unsafe_unpin/tuple_struct.expanded.rs index 1a41976..de4e926 100644 --- a/tests/expand/unsafe_unpin/tuple_struct.expanded.rs +++ b/tests/expand/unsafe_unpin/tuple_struct.expanded.rs @@ -6,6 +6,7 @@ struct TupleStruct<T, U>(#[pin] 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)] @@ -34,21 +35,29 @@ const _: () = { where TupleStruct<T, U>: 'pin; impl<T, U> TupleStruct<T, U> { + #[allow(dead_code)] fn project<'pin>( self: _pin_project::__private::Pin<&'pin mut Self>, ) -> __TupleStructProjection<'pin, T, U> { unsafe { let Self(_0, _1) = self.get_unchecked_mut(); - __TupleStructProjection(_pin_project::__private::Pin::new_unchecked(_0), _1) + __TupleStructProjection( + _pin_project::__private::Pin::new_unchecked(_0), + _1, + ) } } + #[allow(dead_code)] #[allow(clippy::missing_const_for_fn)] fn project_ref<'pin>( self: _pin_project::__private::Pin<&'pin Self>, ) -> __TupleStructProjectionRef<'pin, T, U> { unsafe { let Self(_0, _1) = self.get_ref(); - __TupleStructProjectionRef(_pin_project::__private::Pin::new_unchecked(_0), _1) + __TupleStructProjectionRef( + _pin_project::__private::Pin::new_unchecked(_0), + _1, + ) } } } @@ -57,10 +66,10 @@ const _: () = { let _ = &this.0; let _ = &this.1; } - impl<'pin, T, U> _pin_project::__private::Unpin for TupleStruct<T, U> where - _pin_project::__private::Wrapper<'pin, Self>: _pin_project::UnsafeUnpin - { - } + impl<'pin, T, U> _pin_project::__private::Unpin for TupleStruct<T, U> + where + _pin_project::__private::Wrapper<'pin, Self>: _pin_project::UnsafeUnpin, + {} trait TupleStructMustNotImplDrop {} #[allow(clippy::drop_bounds, drop_bounds)] impl<T: _pin_project::__private::Drop> TupleStructMustNotImplDrop for T {} |