aboutsummaryrefslogtreecommitdiff
path: root/tests/expand/naming/tuple_struct-own.expanded.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/expand/naming/tuple_struct-own.expanded.rs')
-rw-r--r--tests/expand/naming/tuple_struct-own.expanded.rs43
1 files changed, 29 insertions, 14 deletions
diff --git a/tests/expand/naming/tuple_struct-own.expanded.rs b/tests/expand/naming/tuple_struct-own.expanded.rs
index 21e12de..37e4c34 100644
--- a/tests/expand/naming/tuple_struct-own.expanded.rs
+++ b/tests/expand/naming/tuple_struct-own.expanded.rs
@@ -1,11 +1,12 @@
use pin_project::pin_project;
-# [pin (__private (project_replace = ProjOwn))]
+#[pin(__private(project_replace = ProjOwn))]
struct TupleStruct<T, U>(#[pin] T, U);
#[allow(box_pointers)]
#[allow(deprecated)]
#[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)]
@@ -17,6 +18,7 @@ struct ProjOwn<T, U>(::pin_project::__private::PhantomData<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)]
@@ -45,38 +47,51 @@ 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,
+ )
}
}
+ #[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(_0, _1) = &mut *__self_ptr;
let __result = ProjOwn(
_pin_project::__private::PhantomData,
_pin_project::__private::ptr::read(_1),
);
{
- let __guard = _pin_project::__private::UnsafeDropInPlaceGuard::new(_0);
+ let __guard = _pin_project::__private::UnsafeDropInPlaceGuard::new(
+ _0,
+ );
}
__result
}
@@ -98,15 +113,15 @@ const _: () = {
>,
__field0: T,
}
- impl<'pin, T, U> _pin_project::__private::Unpin for TupleStruct<T, U> where
- __TupleStruct<'pin, T, U>: _pin_project::__private::Unpin
- {
- }
+ impl<'pin, T, U> _pin_project::__private::Unpin for TupleStruct<T, U>
+ where
+ __TupleStruct<'pin, T, U>: _pin_project::__private::Unpin,
+ {}
#[doc(hidden)]
- unsafe impl<'pin, T, U> _pin_project::UnsafeUnpin for TupleStruct<T, U> where
- __TupleStruct<'pin, T, U>: _pin_project::__private::Unpin
- {
- }
+ unsafe impl<'pin, T, U> _pin_project::UnsafeUnpin for TupleStruct<T, U>
+ where
+ __TupleStruct<'pin, T, U>: _pin_project::__private::Unpin,
+ {}
trait TupleStructMustNotImplDrop {}
#[allow(clippy::drop_bounds, drop_bounds)]
impl<T: _pin_project::__private::Drop> TupleStructMustNotImplDrop for T {}