1 use pin_project::pin_project;
2 #[pin(__private(project = Proj, project_ref = ProjRef, project_replace = ProjOwn))]
3 struct TupleStruct<T, U>(#[pin] T, U);
4 #[allow(box_pointers)]
5 #[allow(deprecated)]
6 #[allow(explicit_outlives_requirements)]
7 #[allow(single_use_lifetimes)]
8 #[allow(unreachable_pub)]
9 #[allow(unused_tuple_struct_fields)]
10 #[allow(clippy::unknown_clippy_lints)]
11 #[allow(clippy::pattern_type_mismatch)]
12 #[allow(clippy::redundant_pub_crate)]
13 #[allow(clippy::type_repetition_in_bounds)]
14 #[allow(dead_code)]
15 #[allow(clippy::mut_mut)]
16 struct Proj<'pin, T, U>(
17     ::pin_project::__private::Pin<&'pin mut (T)>,
18     &'pin mut (U),
19 )
20 where
21     TupleStruct<T, U>: 'pin;
22 #[allow(box_pointers)]
23 #[allow(deprecated)]
24 #[allow(explicit_outlives_requirements)]
25 #[allow(single_use_lifetimes)]
26 #[allow(unreachable_pub)]
27 #[allow(unused_tuple_struct_fields)]
28 #[allow(clippy::unknown_clippy_lints)]
29 #[allow(clippy::pattern_type_mismatch)]
30 #[allow(clippy::redundant_pub_crate)]
31 #[allow(clippy::type_repetition_in_bounds)]
32 #[allow(dead_code)]
33 #[allow(clippy::ref_option_ref)]
34 struct ProjRef<'pin, T, U>(
35     ::pin_project::__private::Pin<&'pin (T)>,
36     &'pin (U),
37 )
38 where
39     TupleStruct<T, U>: 'pin;
40 #[allow(box_pointers)]
41 #[allow(deprecated)]
42 #[allow(explicit_outlives_requirements)]
43 #[allow(single_use_lifetimes)]
44 #[allow(unreachable_pub)]
45 #[allow(unused_tuple_struct_fields)]
46 #[allow(clippy::unknown_clippy_lints)]
47 #[allow(clippy::pattern_type_mismatch)]
48 #[allow(clippy::redundant_pub_crate)]
49 #[allow(clippy::type_repetition_in_bounds)]
50 #[allow(dead_code)]
51 struct ProjOwn<T, U>(::pin_project::__private::PhantomData<T>, U);
52 #[allow(box_pointers)]
53 #[allow(deprecated)]
54 #[allow(explicit_outlives_requirements)]
55 #[allow(single_use_lifetimes)]
56 #[allow(unreachable_pub)]
57 #[allow(unused_tuple_struct_fields)]
58 #[allow(clippy::unknown_clippy_lints)]
59 #[allow(clippy::pattern_type_mismatch)]
60 #[allow(clippy::redundant_pub_crate)]
61 #[allow(clippy::type_repetition_in_bounds)]
62 #[allow(unused_qualifications)]
63 #[allow(clippy::semicolon_if_nothing_returned)]
64 #[allow(clippy::use_self)]
65 #[allow(clippy::used_underscore_binding)]
66 const _: () = {
67     #[allow(unused_extern_crates)]
68     extern crate pin_project as _pin_project;
69     impl<T, U> TupleStruct<T, U> {
70         #[allow(dead_code)]
71         #[inline]
project<'pin>( self: _pin_project::__private::Pin<&'pin mut Self>, ) -> Proj<'pin, T, U>72         fn project<'pin>(
73             self: _pin_project::__private::Pin<&'pin mut Self>,
74         ) -> Proj<'pin, T, U> {
75             unsafe {
76                 let Self(_0, _1) = self.get_unchecked_mut();
77                 Proj(_pin_project::__private::Pin::new_unchecked(_0), _1)
78             }
79         }
80         #[allow(dead_code)]
81         #[allow(clippy::missing_const_for_fn)]
82         #[inline]
project_ref<'pin>( self: _pin_project::__private::Pin<&'pin Self>, ) -> ProjRef<'pin, T, U>83         fn project_ref<'pin>(
84             self: _pin_project::__private::Pin<&'pin Self>,
85         ) -> ProjRef<'pin, T, U> {
86             unsafe {
87                 let Self(_0, _1) = self.get_ref();
88                 ProjRef(_pin_project::__private::Pin::new_unchecked(_0), _1)
89             }
90         }
91         #[allow(dead_code)]
92         #[inline]
project_replace( self: _pin_project::__private::Pin<&mut Self>, __replacement: Self, ) -> ProjOwn<T, U>93         fn project_replace(
94             self: _pin_project::__private::Pin<&mut Self>,
95             __replacement: Self,
96         ) -> ProjOwn<T, U> {
97             unsafe {
98                 let __self_ptr: *mut Self = self.get_unchecked_mut();
99                 let __guard = _pin_project::__private::UnsafeOverwriteGuard::new(
100                     __self_ptr,
101                     __replacement,
102                 );
103                 let Self(_0, _1) = &mut *__self_ptr;
104                 let __result = ProjOwn(
105                     _pin_project::__private::PhantomData,
106                     _pin_project::__private::ptr::read(_1),
107                 );
108                 {
109                     let __guard = _pin_project::__private::UnsafeDropInPlaceGuard::new(
110                         _0,
111                     );
112                 }
113                 __result
114             }
115         }
116     }
117     #[forbid(unaligned_references, safe_packed_borrows)]
__assert_not_repr_packed<T, U>(this: &TupleStruct<T, U>)118     fn __assert_not_repr_packed<T, U>(this: &TupleStruct<T, U>) {
119         let _ = &this.0;
120         let _ = &this.1;
121     }
122     #[allow(missing_debug_implementations)]
123     struct __TupleStruct<'pin, T, U> {
124         __pin_project_use_generics: _pin_project::__private::AlwaysUnpin<
125             'pin,
126             (
127                 _pin_project::__private::PhantomData<T>,
128                 _pin_project::__private::PhantomData<U>,
129             ),
130         >,
131         __field0: T,
132     }
133     impl<'pin, T, U> _pin_project::__private::Unpin for TupleStruct<T, U>
134     where
135         __TupleStruct<'pin, T, U>: _pin_project::__private::Unpin,
136     {}
137     #[doc(hidden)]
138     unsafe impl<'pin, T, U> _pin_project::UnsafeUnpin for TupleStruct<T, U>
139     where
140         __TupleStruct<'pin, T, U>: _pin_project::__private::Unpin,
141     {}
142     trait TupleStructMustNotImplDrop {}
143     #[allow(clippy::drop_bounds, drop_bounds)]
144     impl<T: _pin_project::__private::Drop> TupleStructMustNotImplDrop for T {}
145     impl<T, U> TupleStructMustNotImplDrop for TupleStruct<T, U> {}
146     #[doc(hidden)]
147     impl<T, U> _pin_project::__private::PinnedDrop for TupleStruct<T, U> {
drop(self: _pin_project::__private::Pin<&mut Self>)148         unsafe fn drop(self: _pin_project::__private::Pin<&mut Self>) {}
149     }
150 };
main()151 fn main() {}
152