1 // Copyright 2022 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 // Since some macros from `macros.rs` are unused. 10 #![allow(unused)] 11 12 extern crate zerocopy; 13 extern crate zerocopy_derive; 14 15 include!("../../../src/macros.rs"); 16 17 use zerocopy::*; 18 use zerocopy_derive::*; 19 main()20fn main() {} 21 22 #[derive(FromZeroes, FromBytes, AsBytes, Unaligned)] 23 #[repr(transparent)] 24 struct Foo<T>(T); 25 26 impl_or_verify!(T => FromZeroes for Foo<T>); 27 impl_or_verify!(T => FromBytes for Foo<T>); 28 impl_or_verify!(T => AsBytes for Foo<T>); 29 impl_or_verify!(T => Unaligned for Foo<T>); 30