Fix proc macro

This commit is contained in:
hodasemi 2023-02-01 13:21:47 +01:00
parent b5af5fbe70
commit 90d5661d12
2 changed files with 1 additions and 14 deletions

View file

@ -1,5 +1,3 @@
use reprc_proc_macro::DeriveReprC;
#[macro_export] #[macro_export]
macro_rules! impl_reprc { macro_rules! impl_reprc {
( (
@ -20,17 +18,6 @@ macro_rules! impl_reprc {
}; };
} }
impl_reprc!(
struct Test {
#[assume_reprc]
i1: i32,
#[assume_reprc]
i2: i32,
#[assume_reprc]
v1: Vec<i32>,
}
);
pub unsafe trait ReprC { pub unsafe trait ReprC {
fn is_repr_c(&self) -> bool; fn is_repr_c(&self) -> bool;
} }

View file

@ -46,7 +46,7 @@ pub fn reprc_builder(item: TokenStream) -> TokenStream {
true true
#( #(
&& self. #reprc_fields.to_tokens() .is_repr_c() && (&self. #reprc_fields as &dyn ReprC) .is_repr_c()
)* )*
} }
} }