1 use std::pin::Pin;
2 use pin_project::{pin_project, pinned_drop};
3 #[pin(__private(PinnedDrop))]
4 struct TupleStruct<T, U>(#[pin] T, U);
5 #[allow(box_pointers)]
6 #[allow(deprecated)]
7 #[allow(explicit_outlives_requirements)]
8 #[allow(single_use_lifetimes)]
9 #[allow(unreachable_pub)]
10 #[allow(unused_tuple_struct_fields)]
11 #[allow(clippy::unknown_clippy_lints)]
12 #[allow(clippy::pattern_type_mismatch)]
13 #[allow(clippy::redundant_pub_crate)]
14 #[allow(clippy::type_repetition_in_bounds)]
15 #[allow(unused_qualifications)]
16 #[allow(clippy::semicolon_if_nothing_returned)]
17 #[allow(clippy::use_self)]
18 #[allow(clippy::used_underscore_binding)]
19 const _: () = {
20 #[allow(unused_extern_crates)]
21 extern crate pin_project as _pin_project;
22 #[allow(dead_code)]
23 #[allow(clippy::mut_mut)]
24 struct __TupleStructProjection<'pin, T, U>(
25 ::pin_project::__private::Pin<&'pin mut (T)>,
26 &'pin mut (U),
27 )
28 where
29 TupleStruct<T, U>: 'pin;
30 #[allow(dead_code)]
31 #[allow(clippy::ref_option_ref)]
32 struct __TupleStructProjectionRef<'pin, T, U>(
33 ::pin_project::__private::Pin<&'pin (T)>,
34 &'pin (U),
35 )
36 where
37 TupleStruct<T, U>: 'pin;
38 impl<T, U> TupleStruct<T, U> {
39 #[allow(dead_code)]
40 #[inline]
project<'pin>( self: _pin_project::__private::Pin<&'pin mut Self>, ) -> __TupleStructProjection<'pin, T, U>41 fn project<'pin>(
42 self: _pin_project::__private::Pin<&'pin mut Self>,
43 ) -> __TupleStructProjection<'pin, T, U> {
44 unsafe {
45 let Self(_0, _1) = self.get_unchecked_mut();
46 __TupleStructProjection(
47 _pin_project::__private::Pin::new_unchecked(_0),
48 _1,
49 )
50 }
51 }
52 #[allow(dead_code)]
53 #[allow(clippy::missing_const_for_fn)]
54 #[inline]
project_ref<'pin>( self: _pin_project::__private::Pin<&'pin Self>, ) -> __TupleStructProjectionRef<'pin, T, U>55 fn project_ref<'pin>(
56 self: _pin_project::__private::Pin<&'pin Self>,
57 ) -> __TupleStructProjectionRef<'pin, T, U> {
58 unsafe {
59 let Self(_0, _1) = self.get_ref();
60 __TupleStructProjectionRef(
61 _pin_project::__private::Pin::new_unchecked(_0),
62 _1,
63 )
64 }
65 }
66 }
67 #[forbid(unaligned_references, safe_packed_borrows)]
__assert_not_repr_packed<T, U>(this: &TupleStruct<T, U>)68 fn __assert_not_repr_packed<T, U>(this: &TupleStruct<T, U>) {
69 let _ = &this.0;
70 let _ = &this.1;
71 }
72 #[allow(missing_debug_implementations)]
73 struct __TupleStruct<'pin, T, U> {
74 __pin_project_use_generics: _pin_project::__private::AlwaysUnpin<
75 'pin,
76 (
77 _pin_project::__private::PhantomData<T>,
78 _pin_project::__private::PhantomData<U>,
79 ),
80 >,
81 __field0: T,
82 }
83 impl<'pin, T, U> _pin_project::__private::Unpin for TupleStruct<T, U>
84 where
85 __TupleStruct<'pin, T, U>: _pin_project::__private::Unpin,
86 {}
87 #[doc(hidden)]
88 unsafe impl<'pin, T, U> _pin_project::UnsafeUnpin for TupleStruct<T, U>
89 where
90 __TupleStruct<'pin, T, U>: _pin_project::__private::Unpin,
91 {}
92 impl<T, U> _pin_project::__private::Drop for TupleStruct<T, U> {
drop(&mut self)93 fn drop(&mut self) {
94 unsafe {
95 let __pinned_self = _pin_project::__private::Pin::new_unchecked(self);
96 _pin_project::__private::PinnedDrop::drop(__pinned_self);
97 }
98 }
99 }
100 };
101 #[doc(hidden)]
102 impl<T, U> ::pin_project::__private::PinnedDrop for TupleStruct<T, U> {
drop(self: Pin<&mut Self>)103 unsafe fn drop(self: Pin<&mut Self>) {
104 #[allow(clippy::needless_pass_by_value)]
105 fn __drop_inner<T, U>(__self: Pin<&mut TupleStruct<T, U>>) {
106 fn __drop_inner() {}
107 let _ = __self;
108 }
109 __drop_inner(self);
110 }
111 }
main()112 fn main() {}
113