//! It is typical for macros to insert the T: SharedMemCast bound automatically use shared_memory::SharedMemCast; #[derive(SharedMemCast)] pub struct MyStruct { x: T, } #[derive(SharedMemCast)] pub struct MyStruct2(T); #[derive(SharedMemCast)] pub enum MyData { Foo(i32), Bar { x: f64, yyy: [f64; 32], val: T, } } fn assert_impl() {} fn main() { assert_impl::>(); assert_impl::>(); assert_impl::>(); fn generic_param() { assert_impl::>(); } assert_impl::>(); assert_impl::>(); assert_impl::>(); fn generic_param2() { assert_impl::>(); } assert_impl::>(); assert_impl::>(); assert_impl::>(); fn generic_param3() { assert_impl::>(); } }