1 use pin_project_lite::pin_project;
2 enum Enum<T, U> {
3 Struct { pinned: T, unpinned: U },
4 Unit,
5 }
6 #[allow(dead_code)]
7 #[allow(single_use_lifetimes)]
8 #[allow(clippy::unknown_clippy_lints)]
9 #[allow(clippy::mut_mut)]
10 #[allow(clippy::redundant_pub_crate)]
11 #[allow(clippy::ref_option_ref)]
12 #[allow(clippy::type_repetition_in_bounds)]
13 enum EnumProjRef<'__pin, T, U>
14 where
15 Enum<T, U>: '__pin,
16 {
17 Struct {
18 pinned: ::pin_project_lite::__private::Pin<&'__pin (T)>,
19 unpinned: &'__pin (U),
20 },
21 Unit,
22 }
23 #[allow(single_use_lifetimes)]
24 #[allow(clippy::unknown_clippy_lints)]
25 #[allow(clippy::used_underscore_binding)]
26 const _: () = {
27 impl<T, U> Enum<T, U> {
project_ref<'__pin>( self: ::pin_project_lite::__private::Pin<&'__pin Self>, ) -> EnumProjRef<'__pin, T, U>28 fn project_ref<'__pin>(
29 self: ::pin_project_lite::__private::Pin<&'__pin Self>,
30 ) -> EnumProjRef<'__pin, T, U> {
31 unsafe {
32 match self.get_ref() {
33 Self::Struct { pinned, unpinned } => EnumProjRef::Struct {
34 pinned: ::pin_project_lite::__private::Pin::new_unchecked(pinned),
35 unpinned: unpinned,
36 },
37 Self::Unit => EnumProjRef::Unit,
38 }
39 }
40 }
41 }
42 #[allow(non_snake_case)]
43 struct __Origin<'__pin, T, U> {
44 __dummy_lifetime: ::pin_project_lite::__private::PhantomData<&'__pin ()>,
45 Struct: (T, ::pin_project_lite::__private::AlwaysUnpin<U>),
46 Unit: (),
47 }
48 impl<'__pin, T, U> ::pin_project_lite::__private::Unpin for Enum<T, U> where
49 __Origin<'__pin, T, U>: ::pin_project_lite::__private::Unpin
50 {
51 }
52 trait MustNotImplDrop {}
53 #[allow(clippy::drop_bounds, drop_bounds)]
54 impl<T: ::pin_project_lite::__private::Drop> MustNotImplDrop for T {}
55 impl<T, U> MustNotImplDrop for Enum<T, U> {}
56 };
main()57 fn main() {}
58