Debian Codegraph @

debian/missing-sources/zerocopy-derive/src/output_tests/expected/known_layout_struct.expected.rs

raw
1 #[allow(
2 deprecated,
3 private_bounds,
4 non_local_definitions,
5 non_camel_case_types,
6 non_upper_case_globals,
7 non_snake_case,
8 non_ascii_idents,
9 clippy::missing_inline_in_public_items,
10 )]
11 #[deny(ambiguous_associated_items)]
12 #[automatically_derived]
13 const _: () = {
14 unsafe impl ::zerocopy::KnownLayout for Foo
15 where
16 Self: ::zerocopy::util::macro_util::core_reexport::marker::Sized,
17 {
18 fn only_derive_is_allowed_to_implement_this_trait() {}
19 type PointerMetadata = ();
20 type MaybeUninit = ::zerocopy::util::macro_util::core_reexport::mem::MaybeUninit<
21 Self,
22 >;
23 const LAYOUT: ::zerocopy::DstLayout = ::zerocopy::DstLayout::for_type::<Self>();
24 #[inline(always)]
25 fn raw_from_ptr_len(
26 bytes: ::zerocopy::util::macro_util::core_reexport::ptr::NonNull<u8>,
27 _meta: (),
28 ) -> ::zerocopy::util::macro_util::core_reexport::ptr::NonNull<Self> {
29 bytes.cast::<Self>()
30 }
31 #[inline(always)]
32 fn pointer_to_metadata(_ptr: *mut Self) -> () {}
33 }
34 };