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