Debian Codegraph @

vendor/pin-project-lite/tests/expand/naming/struct-none.expanded.rs

raw
1 use pin_project_lite::pin_project;
2 struct Struct<T, U> {
3 pinned: T,
4 unpinned: U,
5 }
6 #[allow(
7 explicit_outlives_requirements,
8 single_use_lifetimes,
9 clippy::unknown_clippy_lints,
10 clippy::absolute_paths,
11 clippy::min_ident_chars,
12 clippy::redundant_pub_crate,
13 clippy::single_char_lifetime_names,
14 clippy::used_underscore_binding
15 )]
16 const _: () = {
17 #[doc(hidden)]
18 #[allow(
19 dead_code,
20 single_use_lifetimes,
21 clippy::unknown_clippy_lints,
22 clippy::absolute_paths,
23 clippy::min_ident_chars,
24 clippy::mut_mut,
25 clippy::redundant_pub_crate,
26 clippy::ref_option_ref,
27 clippy::single_char_lifetime_names,
28 clippy::type_repetition_in_bounds
29 )]
30 struct Projection<'__pin, T, U>
31 where
32 Struct<T, U>: '__pin,
33 {
34 pinned: ::pin_project_lite::__private::Pin<&'__pin mut (T)>,
35 unpinned: &'__pin mut (U),
36 }
37 #[doc(hidden)]
38 #[allow(
39 dead_code,
40 single_use_lifetimes,
41 clippy::unknown_clippy_lints,
42 clippy::absolute_paths,
43 clippy::min_ident_chars,
44 clippy::mut_mut,
45 clippy::redundant_pub_crate,
46 clippy::ref_option_ref,
47 clippy::single_char_lifetime_names,
48 clippy::type_repetition_in_bounds
49 )]
50 struct ProjectionRef<'__pin, T, U>
51 where
52 Struct<T, U>: '__pin,
53 {
54 pinned: ::pin_project_lite::__private::Pin<&'__pin (T)>,
55 unpinned: &'__pin (U),
56 }
57 impl<T, U> Struct<T, U> {
58 #[doc(hidden)]
59 #[inline]
60 fn project<'__pin>(
61 self: ::pin_project_lite::__private::Pin<&'__pin mut Self>,
62 ) -> Projection<'__pin, T, U> {
63 unsafe {
64 let Self { pinned, unpinned } = self.get_unchecked_mut();
65 Projection {
66 pinned: ::pin_project_lite::__private::Pin::new_unchecked(pinned),
67 unpinned: unpinned,
68 }
69 }
70 }
71 #[doc(hidden)]
72 #[inline]
73 fn project_ref<'__pin>(
74 self: ::pin_project_lite::__private::Pin<&'__pin Self>,
75 ) -> ProjectionRef<'__pin, T, U> {
76 unsafe {
77 let Self { pinned, unpinned } = self.get_ref();
78 ProjectionRef {
79 pinned: ::pin_project_lite::__private::Pin::new_unchecked(pinned),
80 unpinned: unpinned,
81 }
82 }
83 }
84 }
85 #[allow(non_snake_case)]
86 struct __Origin<'__pin, T, U> {
87 __dummy_lifetime: ::pin_project_lite::__private::PhantomData<&'__pin ()>,
88 pinned: T,
89 unpinned: ::pin_project_lite::__private::AlwaysUnpin<U>,
90 }
91 impl<'__pin, T, U> ::pin_project_lite::__private::Unpin for Struct<T, U>
92 where
93 ::pin_project_lite::__private::PinnedFieldsOf<
94 __Origin<'__pin, T, U>,
95 >: ::pin_project_lite::__private::Unpin,
96 {}
97 trait MustNotImplDrop {}
98 #[allow(clippy::drop_bounds, drop_bounds)]
99 impl<T: ::pin_project_lite::__private::Drop> MustNotImplDrop for T {}
100 impl<T, U> MustNotImplDrop for Struct<T, U> {}
101 #[forbid(unaligned_references, safe_packed_borrows)]
102 fn __assert_not_repr_packed<T, U>(this: &Struct<T, U>) {
103 let _ = &this.pinned;
104 let _ = &this.unpinned;
105 }
106 };
107 fn main() {}