summaryrefslogtreecommitdiffstats
path: root/vendor/pin-project-lite/tests/expand
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:57:31 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:57:31 +0000
commitdc0db358abe19481e475e10c32149b53370f1a1c (patch)
treeab8ce99c4b255ce46f99ef402c27916055b899ee /vendor/pin-project-lite/tests/expand
parentReleasing progress-linux version 1.71.1+dfsg1-2~progress7.99u1. (diff)
downloadrustc-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')
-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
-rw-r--r--vendor/pin-project-lite/tests/expand/multifields/enum.expanded.rs39
-rw-r--r--vendor/pin-project-lite/tests/expand/multifields/struct.expanded.rs41
-rw-r--r--vendor/pin-project-lite/tests/expand/naming/enum-all.expanded.rs44
-rw-r--r--vendor/pin-project-lite/tests/expand/naming/enum-mut.expanded.rs21
-rw-r--r--vendor/pin-project-lite/tests/expand/naming/enum-none.expanded.rs8
-rw-r--r--vendor/pin-project-lite/tests/expand/naming/enum-ref.expanded.rs21
-rw-r--r--vendor/pin-project-lite/tests/expand/naming/struct-all.expanded.rs15
-rw-r--r--vendor/pin-project-lite/tests/expand/naming/struct-mut.expanded.rs10
-rw-r--r--vendor/pin-project-lite/tests/expand/naming/struct-none.expanded.rs10
-rw-r--r--vendor/pin-project-lite/tests/expand/naming/struct-ref.expanded.rs10
-rw-r--r--vendor/pin-project-lite/tests/expand/pinned_drop/enum.expanded.rs45
-rw-r--r--vendor/pin-project-lite/tests/expand/pinned_drop/enum.rs3
-rw-r--r--vendor/pin-project-lite/tests/expand/pinned_drop/struct.expanded.rs21
-rw-r--r--vendor/pin-project-lite/tests/expand/pinned_drop/struct.rs3
-rw-r--r--vendor/pin-project-lite/tests/expand/pub/enum.expanded.rs34
-rw-r--r--vendor/pin-project-lite/tests/expand/pub/struct.expanded.rs10
18 files changed, 228 insertions, 161 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 {}
diff --git a/vendor/pin-project-lite/tests/expand/multifields/enum.expanded.rs b/vendor/pin-project-lite/tests/expand/multifields/enum.expanded.rs
index fca0febcd..f6bf9dcdd 100644
--- a/vendor/pin-project-lite/tests/expand/multifields/enum.expanded.rs
+++ b/vendor/pin-project-lite/tests/expand/multifields/enum.expanded.rs
@@ -1,11 +1,6 @@
use pin_project_lite::pin_project;
enum Enum<T, U> {
- Struct {
- pinned1: T,
- pinned2: T,
- unpinned1: U,
- unpinned2: U,
- },
+ Struct { pinned1: T, pinned2: T, unpinned1: U, unpinned2: U },
Unit,
}
#[allow(dead_code)]
@@ -27,6 +22,7 @@ enum EnumProjReplace<T, U> {
#[allow(clippy::used_underscore_binding)]
const _: () = {
impl<T, U> Enum<T, U> {
+ #[inline]
fn project_replace(
self: ::pin_project_lite::__private::Pin<&mut Self>,
replacement: Self,
@@ -38,22 +34,25 @@ const _: () = {
replacement,
);
match &mut *__self_ptr {
- Self::Struct {
- pinned1,
- pinned2,
- unpinned1,
- unpinned2,
- } => {
+ Self::Struct { pinned1, pinned2, unpinned1, unpinned2 } => {
let result = EnumProjReplace::Struct {
pinned1: ::pin_project_lite::__private::PhantomData,
pinned2: ::pin_project_lite::__private::PhantomData,
- unpinned1: ::pin_project_lite::__private::ptr::read(unpinned1),
- unpinned2: ::pin_project_lite::__private::ptr::read(unpinned2),
+ unpinned1: ::pin_project_lite::__private::ptr::read(
+ unpinned1,
+ ),
+ unpinned2: ::pin_project_lite::__private::ptr::read(
+ unpinned2,
+ ),
};
{
(
- ::pin_project_lite::__private::UnsafeDropInPlaceGuard::new(pinned1),
- ::pin_project_lite::__private::UnsafeDropInPlaceGuard::new(pinned2),
+ ::pin_project_lite::__private::UnsafeDropInPlaceGuard::new(
+ pinned1,
+ ),
+ ::pin_project_lite::__private::UnsafeDropInPlaceGuard::new(
+ pinned2,
+ ),
(),
(),
);
@@ -76,10 +75,10 @@ const _: () = {
),
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/multifields/struct.expanded.rs b/vendor/pin-project-lite/tests/expand/multifields/struct.expanded.rs
index 4320f6843..fdf6edfa4 100644
--- a/vendor/pin-project-lite/tests/expand/multifields/struct.expanded.rs
+++ b/vendor/pin-project-lite/tests/expand/multifields/struct.expanded.rs
@@ -55,16 +55,13 @@ const _: () = {
unpinned2: &'__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> {
unsafe {
- let Self {
- pinned1,
- pinned2,
- unpinned1,
- unpinned2,
- } = self.get_unchecked_mut();
+ let Self { pinned1, pinned2, unpinned1, unpinned2 } = self
+ .get_unchecked_mut();
Projection {
pinned1: ::pin_project_lite::__private::Pin::new_unchecked(pinned1),
pinned2: ::pin_project_lite::__private::Pin::new_unchecked(pinned2),
@@ -73,16 +70,12 @@ const _: () = {
}
}
}
+ #[inline]
fn project_ref<'__pin>(
self: ::pin_project_lite::__private::Pin<&'__pin Self>,
) -> ProjectionRef<'__pin, T, U> {
unsafe {
- let Self {
- pinned1,
- pinned2,
- unpinned1,
- unpinned2,
- } = self.get_ref();
+ let Self { pinned1, pinned2, unpinned1, unpinned2 } = self.get_ref();
ProjectionRef {
pinned1: ::pin_project_lite::__private::Pin::new_unchecked(pinned1),
pinned2: ::pin_project_lite::__private::Pin::new_unchecked(pinned2),
@@ -91,6 +84,7 @@ const _: () = {
}
}
}
+ #[inline]
fn project_replace(
self: ::pin_project_lite::__private::Pin<&mut Self>,
replacement: Self,
@@ -101,12 +95,7 @@ const _: () = {
__self_ptr,
replacement,
);
- let Self {
- pinned1,
- pinned2,
- unpinned1,
- unpinned2,
- } = &mut *__self_ptr;
+ let Self { pinned1, pinned2, unpinned1, unpinned2 } = &mut *__self_ptr;
let result = StructProjReplace {
pinned1: ::pin_project_lite::__private::PhantomData,
pinned2: ::pin_project_lite::__private::PhantomData,
@@ -115,8 +104,12 @@ const _: () = {
};
{
(
- ::pin_project_lite::__private::UnsafeDropInPlaceGuard::new(pinned1),
- ::pin_project_lite::__private::UnsafeDropInPlaceGuard::new(pinned2),
+ ::pin_project_lite::__private::UnsafeDropInPlaceGuard::new(
+ pinned1,
+ ),
+ ::pin_project_lite::__private::UnsafeDropInPlaceGuard::new(
+ pinned2,
+ ),
(),
(),
);
@@ -133,10 +126,10 @@ const _: () = {
unpinned1: ::pin_project_lite::__private::AlwaysUnpin<U>,
unpinned2: ::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 {}
diff --git a/vendor/pin-project-lite/tests/expand/naming/enum-all.expanded.rs b/vendor/pin-project-lite/tests/expand/naming/enum-all.expanded.rs
index eae0aac85..09e869144 100644
--- a/vendor/pin-project-lite/tests/expand/naming/enum-all.expanded.rs
+++ b/vendor/pin-project-lite/tests/expand/naming/enum-all.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/naming/enum-mut.expanded.rs b/vendor/pin-project-lite/tests/expand/naming/enum-mut.expanded.rs
index 7c4d6afbf..79c9050e6 100644
--- a/vendor/pin-project-lite/tests/expand/naming/enum-mut.expanded.rs
+++ b/vendor/pin-project-lite/tests/expand/naming/enum-mut.expanded.rs
@@ -25,15 +25,20 @@ where
#[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,
}
}
@@ -45,10 +50,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/naming/enum-none.expanded.rs b/vendor/pin-project-lite/tests/expand/naming/enum-none.expanded.rs
index 28ce97da7..fc3b3dcaf 100644
--- a/vendor/pin-project-lite/tests/expand/naming/enum-none.expanded.rs
+++ b/vendor/pin-project-lite/tests/expand/naming/enum-none.expanded.rs
@@ -14,10 +14,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/naming/enum-ref.expanded.rs b/vendor/pin-project-lite/tests/expand/naming/enum-ref.expanded.rs
index a1a013bda..fa155d9b5 100644
--- a/vendor/pin-project-lite/tests/expand/naming/enum-ref.expanded.rs
+++ b/vendor/pin-project-lite/tests/expand/naming/enum-ref.expanded.rs
@@ -25,15 +25,20 @@ where
#[allow(clippy::used_underscore_binding)]
const _: () = {
impl<T, U> Enum<T, U> {
+ #[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,
}
}
@@ -45,10 +50,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/naming/struct-all.expanded.rs b/vendor/pin-project-lite/tests/expand/naming/struct-all.expanded.rs
index b91c24eb2..dfea76248 100644
--- a/vendor/pin-project-lite/tests/expand/naming/struct-all.expanded.rs
+++ b/vendor/pin-project-lite/tests/expand/naming/struct-all.expanded.rs
@@ -47,6 +47,7 @@ struct StructProjReplace<T, U> {
#[allow(clippy::used_underscore_binding)]
const _: () = {
impl<T, U> Struct<T, U> {
+ #[inline]
fn project<'__pin>(
self: ::pin_project_lite::__private::Pin<&'__pin mut Self>,
) -> StructProj<'__pin, T, U> {
@@ -58,6 +59,7 @@ const _: () = {
}
}
}
+ #[inline]
fn project_ref<'__pin>(
self: ::pin_project_lite::__private::Pin<&'__pin Self>,
) -> StructProjRef<'__pin, T, U> {
@@ -69,6 +71,7 @@ const _: () = {
}
}
}
+ #[inline]
fn project_replace(
self: ::pin_project_lite::__private::Pin<&mut Self>,
replacement: Self,
@@ -86,7 +89,9 @@ const _: () = {
};
{
(
- ::pin_project_lite::__private::UnsafeDropInPlaceGuard::new(pinned),
+ ::pin_project_lite::__private::UnsafeDropInPlaceGuard::new(
+ pinned,
+ ),
(),
);
}
@@ -100,10 +105,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 {}
diff --git a/vendor/pin-project-lite/tests/expand/naming/struct-mut.expanded.rs b/vendor/pin-project-lite/tests/expand/naming/struct-mut.expanded.rs
index aaa41cd08..ed05dbbd1 100644
--- a/vendor/pin-project-lite/tests/expand/naming/struct-mut.expanded.rs
+++ b/vendor/pin-project-lite/tests/expand/naming/struct-mut.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>,
) -> StructProj<'__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 {}
diff --git a/vendor/pin-project-lite/tests/expand/naming/struct-none.expanded.rs b/vendor/pin-project-lite/tests/expand/naming/struct-none.expanded.rs
index 8ab318cfb..fc10dd718 100644
--- a/vendor/pin-project-lite/tests/expand/naming/struct-none.expanded.rs
+++ b/vendor/pin-project-lite/tests/expand/naming/struct-none.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 {}
diff --git a/vendor/pin-project-lite/tests/expand/naming/struct-ref.expanded.rs b/vendor/pin-project-lite/tests/expand/naming/struct-ref.expanded.rs
index 3d97ab8fa..4edb63147 100644
--- a/vendor/pin-project-lite/tests/expand/naming/struct-ref.expanded.rs
+++ b/vendor/pin-project-lite/tests/expand/naming/struct-ref.expanded.rs
@@ -38,6 +38,7 @@ const _: () = {
unpinned: &'__pin mut (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>,
) -> StructProjRef<'__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 {}
diff --git a/vendor/pin-project-lite/tests/expand/pinned_drop/enum.expanded.rs b/vendor/pin-project-lite/tests/expand/pinned_drop/enum.expanded.rs
index 665ff6338..838707dc5 100644
--- a/vendor/pin-project-lite/tests/expand/pinned_drop/enum.expanded.rs
+++ b/vendor/pin-project-lite/tests/expand/pinned_drop/enum.expanded.rs
@@ -1,5 +1,5 @@
-use pin_project_lite::pin_project;
use std::pin::Pin;
+use pin_project_lite::pin_project;
enum Enum<T, U> {
Struct { pinned: T, unpinned: U },
Unit,
@@ -43,28 +43,38 @@ where
#[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,
}
}
@@ -76,18 +86,21 @@ 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,
+ {}
impl<T, U> ::pin_project_lite::__private::Drop for Enum<T, U> {
fn drop(&mut self) {
- fn __drop_inner<T, U>(this: ::pin_project_lite::__private::Pin<&mut Enum<T, U>>) {
+ fn __drop_inner<T, U>(
+ this: ::pin_project_lite::__private::Pin<&mut Enum<T, U>>,
+ ) {
fn __drop_inner() {}
let _ = this;
}
- let pinned_self: ::pin_project_lite::__private::Pin<&mut Self> =
- unsafe { ::pin_project_lite::__private::Pin::new_unchecked(self) };
+ let pinned_self: ::pin_project_lite::__private::Pin<&mut Self> = unsafe {
+ ::pin_project_lite::__private::Pin::new_unchecked(self)
+ };
__drop_inner(pinned_self);
}
}
diff --git a/vendor/pin-project-lite/tests/expand/pinned_drop/enum.rs b/vendor/pin-project-lite/tests/expand/pinned_drop/enum.rs
index 1855cb7a1..5f3508c0e 100644
--- a/vendor/pin-project-lite/tests/expand/pinned_drop/enum.rs
+++ b/vendor/pin-project-lite/tests/expand/pinned_drop/enum.rs
@@ -1,6 +1,7 @@
-use pin_project_lite::pin_project;
use std::pin::Pin;
+use pin_project_lite::pin_project;
+
pin_project! {
#[project = EnumProj]
#[project_ref = EnumProjRef]
diff --git a/vendor/pin-project-lite/tests/expand/pinned_drop/struct.expanded.rs b/vendor/pin-project-lite/tests/expand/pinned_drop/struct.expanded.rs
index 5b82b7a19..567fefa8c 100644
--- a/vendor/pin-project-lite/tests/expand/pinned_drop/struct.expanded.rs
+++ b/vendor/pin-project-lite/tests/expand/pinned_drop/struct.expanded.rs
@@ -1,5 +1,5 @@
-use pin_project_lite::pin_project;
use std::pin::Pin;
+use pin_project_lite::pin_project;
struct Struct<T, U> {
pinned: T,
unpinned: U,
@@ -39,6 +39,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> {
@@ -50,6 +51,7 @@ const _: () = {
}
}
}
+ #[inline]
fn project_ref<'__pin>(
self: ::pin_project_lite::__private::Pin<&'__pin Self>,
) -> ProjectionRef<'__pin, T, U> {
@@ -68,18 +70,21 @@ 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,
+ {}
impl<T, U> ::pin_project_lite::__private::Drop for Struct<T, U> {
fn drop(&mut self) {
- fn __drop_inner<T, U>(this: ::pin_project_lite::__private::Pin<&mut Struct<T, U>>) {
+ fn __drop_inner<T, U>(
+ this: ::pin_project_lite::__private::Pin<&mut Struct<T, U>>,
+ ) {
fn __drop_inner() {}
let _ = this;
}
- let pinned_self: ::pin_project_lite::__private::Pin<&mut Self> =
- unsafe { ::pin_project_lite::__private::Pin::new_unchecked(self) };
+ let pinned_self: ::pin_project_lite::__private::Pin<&mut Self> = unsafe {
+ ::pin_project_lite::__private::Pin::new_unchecked(self)
+ };
__drop_inner(pinned_self);
}
}
diff --git a/vendor/pin-project-lite/tests/expand/pinned_drop/struct.rs b/vendor/pin-project-lite/tests/expand/pinned_drop/struct.rs
index 0cc756769..5400ecbbd 100644
--- a/vendor/pin-project-lite/tests/expand/pinned_drop/struct.rs
+++ b/vendor/pin-project-lite/tests/expand/pinned_drop/struct.rs
@@ -1,6 +1,7 @@
-use pin_project_lite::pin_project;
use std::pin::Pin;
+use pin_project_lite::pin_project;
+
pin_project! {
struct Struct<T, U> {
#[pin]
diff --git a/vendor/pin-project-lite/tests/expand/pub/enum.expanded.rs b/vendor/pin-project-lite/tests/expand/pub/enum.expanded.rs
index 6f190cba0..aebc3f738 100644
--- a/vendor/pin-project-lite/tests/expand/pub/enum.expanded.rs
+++ b/vendor/pin-project-lite/tests/expand/pub/enum.expanded.rs
@@ -42,28 +42,38 @@ where
#[allow(clippy::used_underscore_binding)]
const _: () = {
impl<T, U> Enum<T, U> {
+ #[inline]
pub(crate) 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]
pub(crate) 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,
}
}
@@ -75,10 +85,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/pub/struct.expanded.rs b/vendor/pin-project-lite/tests/expand/pub/struct.expanded.rs
index 7b5826d14..7562eb5b7 100644
--- a/vendor/pin-project-lite/tests/expand/pub/struct.expanded.rs
+++ b/vendor/pin-project-lite/tests/expand/pub/struct.expanded.rs
@@ -38,6 +38,7 @@ const _: () = {
pub unpinned: &'__pin (U),
}
impl<T, U> Struct<T, U> {
+ #[inline]
pub(crate) fn project<'__pin>(
self: ::pin_project_lite::__private::Pin<&'__pin mut Self>,
) -> Projection<'__pin, T, U> {
@@ -49,6 +50,7 @@ const _: () = {
}
}
}
+ #[inline]
pub(crate) 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 {}