summaryrefslogtreecommitdiffstats
path: root/vendor/pin-project-lite/tests/expand/default
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/pin-project-lite/tests/expand/default')
-rw-r--r--vendor/pin-project-lite/tests/expand/default/enum.expanded.rs44
-rw-r--r--vendor/pin-project-lite/tests/expand/default/struct.expanded.rs10
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 {}