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