Debian Codegraph @

debian/missing-sources/zerocopy-derive/tests/issue_2835.rs

raw
1 // Copyright 2025 The Fuchsia Authors
2 //
3 // Licensed under a BSD-style license <LICENSE-BSD>, Apache License, Version 2.0
4 // <LICENSE-APACHE or https://www.apache.org/licenses/LICENSE-2.0>, or the MIT
5 // license <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your option.
6 // This file may not be copied, modified, or distributed except according to
7 // those terms.
8
9 use zerocopy_renamed::{IntoBytes, Unalign};
10
11 #[allow(unused)]
12 #[derive(IntoBytes)]
13 #[zerocopy(crate = "zerocopy_renamed")]
14 #[repr(C)]
15 struct Struct {
16 leading: Unalign<u32>,
17 trailing: [u8],
18 }
19
20 #[test]
21 fn test_issue_2835() {
22 // Compilation is enough to verify the fix
23 }