1 use pin_project::pin_project;
2 #[pin(__private(project_replace))]
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(clippy::semicolon_if_nothing_returned)]
13 #[allow(clippy::used_underscore_binding)]
14 const _: () = {
15     #[allow(box_pointers)]
16     #[allow(deprecated)]
17     #[allow(explicit_outlives_requirements)]
18     #[allow(single_use_lifetimes)]
19     #[allow(unreachable_pub)]
20     #[allow(clippy::unknown_clippy_lints)]
21     #[allow(clippy::pattern_type_mismatch)]
22     #[allow(clippy::redundant_pub_crate)]
23     #[allow(dead_code)]
24     #[allow(clippy::mut_mut)]
25     #[allow(clippy::type_repetition_in_bounds)]
26     struct __TupleStructProjection<'pin, T, U>(
27         ::pin_project::__private::Pin<&'pin mut (T)>,
28         &'pin mut (U),
29     )
30     where
31         TupleStruct<T, U>: 'pin;
32     #[allow(box_pointers)]
33     #[allow(deprecated)]
34     #[allow(explicit_outlives_requirements)]
35     #[allow(single_use_lifetimes)]
36     #[allow(unreachable_pub)]
37     #[allow(clippy::unknown_clippy_lints)]
38     #[allow(clippy::pattern_type_mismatch)]
39     #[allow(clippy::redundant_pub_crate)]
40     #[allow(dead_code)]
41     #[allow(clippy::ref_option_ref)]
42     #[allow(clippy::type_repetition_in_bounds)]
43     struct __TupleStructProjectionRef<'pin, T, U>(
44         ::pin_project::__private::Pin<&'pin (T)>,
45         &'pin (U),
46     )
47     where
48         TupleStruct<T, U>: 'pin;
49     #[allow(box_pointers)]
50     #[allow(deprecated)]
51     #[allow(explicit_outlives_requirements)]
52     #[allow(single_use_lifetimes)]
53     #[allow(unreachable_pub)]
54     #[allow(clippy::unknown_clippy_lints)]
55     #[allow(clippy::pattern_type_mismatch)]
56     #[allow(clippy::redundant_pub_crate)]
57     #[allow(dead_code)]
58     struct __TupleStructProjectionOwned<T, U>(::pin_project::__private::PhantomData<T>, U);
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, ) -> __TupleStructProjectionOwned<T, U>77         fn project_replace(
78             self: ::pin_project::__private::Pin<&mut Self>,
79             __replacement: Self,
80         ) -> __TupleStructProjectionOwned<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 = __TupleStructProjectionOwned(
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