diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 03:57:31 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 03:57:31 +0000 |
commit | dc0db358abe19481e475e10c32149b53370f1a1c (patch) | |
tree | ab8ce99c4b255ce46f99ef402c27916055b899ee /vendor/pin-project-lite/tests/expand/default | |
parent | Releasing progress-linux version 1.71.1+dfsg1-2~progress7.99u1. (diff) | |
download | rustc-dc0db358abe19481e475e10c32149b53370f1a1c.tar.xz rustc-dc0db358abe19481e475e10c32149b53370f1a1c.zip |
Merging upstream version 1.72.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/pin-project-lite/tests/expand/default')
-rw-r--r-- | vendor/pin-project-lite/tests/expand/default/enum.expanded.rs | 44 | ||||
-rw-r--r-- | vendor/pin-project-lite/tests/expand/default/struct.expanded.rs | 10 |
2 files changed, 33 insertions, 21 deletions
diff --git a/vendor/pin-project-lite/tests/expand/default/enum.expanded.rs b/vendor/pin-project-lite/tests/expand/default/enum.expanded.rs index eae0aac85..09e869144 100644 --- a/vendor/pin-project-lite/tests/expand/default/enum.expanded.rs +++ b/vendor/pin-project-lite/tests/expand/default/enum.expanded.rs @@ -43,10 +43,7 @@ where #[allow(clippy::redundant_pub_crate)] #[allow(clippy::type_repetition_in_bounds)] enum EnumProjReplace<T, U> { - Struct { - pinned: ::pin_project_lite::__private::PhantomData<T>, - unpinned: U, - }, + Struct { pinned: ::pin_project_lite::__private::PhantomData<T>, unpinned: U }, Unit, } #[allow(single_use_lifetimes)] @@ -54,32 +51,43 @@ enum EnumProjReplace<T, U> { #[allow(clippy::used_underscore_binding)] const _: () = { impl<T, U> Enum<T, U> { + #[inline] fn project<'__pin>( self: ::pin_project_lite::__private::Pin<&'__pin mut Self>, ) -> EnumProj<'__pin, T, U> { unsafe { match self.get_unchecked_mut() { - Self::Struct { pinned, unpinned } => EnumProj::Struct { - pinned: ::pin_project_lite::__private::Pin::new_unchecked(pinned), - unpinned: unpinned, - }, + Self::Struct { pinned, unpinned } => { + EnumProj::Struct { + pinned: ::pin_project_lite::__private::Pin::new_unchecked( + pinned, + ), + unpinned: unpinned, + } + } Self::Unit => EnumProj::Unit, } } } + #[inline] fn project_ref<'__pin>( self: ::pin_project_lite::__private::Pin<&'__pin Self>, ) -> EnumProjRef<'__pin, T, U> { unsafe { match self.get_ref() { - Self::Struct { pinned, unpinned } => EnumProjRef::Struct { - pinned: ::pin_project_lite::__private::Pin::new_unchecked(pinned), - unpinned: unpinned, - }, + Self::Struct { pinned, unpinned } => { + EnumProjRef::Struct { + pinned: ::pin_project_lite::__private::Pin::new_unchecked( + pinned, + ), + unpinned: unpinned, + } + } Self::Unit => EnumProjRef::Unit, } } } + #[inline] fn project_replace( self: ::pin_project_lite::__private::Pin<&mut Self>, replacement: Self, @@ -98,7 +106,9 @@ const _: () = { }; { ( - ::pin_project_lite::__private::UnsafeDropInPlaceGuard::new(pinned), + ::pin_project_lite::__private::UnsafeDropInPlaceGuard::new( + pinned, + ), (), ); } @@ -115,10 +125,10 @@ const _: () = { Struct: (T, ::pin_project_lite::__private::AlwaysUnpin<U>), Unit: (), } - impl<'__pin, T, U> ::pin_project_lite::__private::Unpin for Enum<T, U> where - __Origin<'__pin, T, U>: ::pin_project_lite::__private::Unpin - { - } + impl<'__pin, T, U> ::pin_project_lite::__private::Unpin for Enum<T, U> + where + __Origin<'__pin, T, U>: ::pin_project_lite::__private::Unpin, + {} trait MustNotImplDrop {} #[allow(clippy::drop_bounds, drop_bounds)] impl<T: ::pin_project_lite::__private::Drop> MustNotImplDrop for T {} diff --git a/vendor/pin-project-lite/tests/expand/default/struct.expanded.rs b/vendor/pin-project-lite/tests/expand/default/struct.expanded.rs index 8ab318cfb..fc10dd718 100644 --- a/vendor/pin-project-lite/tests/expand/default/struct.expanded.rs +++ b/vendor/pin-project-lite/tests/expand/default/struct.expanded.rs @@ -38,6 +38,7 @@ const _: () = { unpinned: &'__pin (U), } impl<T, U> Struct<T, U> { + #[inline] fn project<'__pin>( self: ::pin_project_lite::__private::Pin<&'__pin mut Self>, ) -> Projection<'__pin, T, U> { @@ -49,6 +50,7 @@ const _: () = { } } } + #[inline] fn project_ref<'__pin>( self: ::pin_project_lite::__private::Pin<&'__pin Self>, ) -> ProjectionRef<'__pin, T, U> { @@ -67,10 +69,10 @@ const _: () = { pinned: T, unpinned: ::pin_project_lite::__private::AlwaysUnpin<U>, } - impl<'__pin, T, U> ::pin_project_lite::__private::Unpin for Struct<T, U> where - __Origin<'__pin, T, U>: ::pin_project_lite::__private::Unpin - { - } + impl<'__pin, T, U> ::pin_project_lite::__private::Unpin for Struct<T, U> + where + __Origin<'__pin, T, U>: ::pin_project_lite::__private::Unpin, + {} trait MustNotImplDrop {} #[allow(clippy::drop_bounds, drop_bounds)] impl<T: ::pin_project_lite::__private::Drop> MustNotImplDrop for T {} |