diff --git a/crates/oxc_ast_macros/src/lib.rs b/crates/oxc_ast_macros/src/lib.rs index 30bdec2ddea8b5..8bb61b94b6e225 100644 --- a/crates/oxc_ast_macros/src/lib.rs +++ b/crates/oxc_ast_macros/src/lib.rs @@ -27,9 +27,9 @@ fn enum_repr(enum_: &syn::ItemEnum) -> TokenStream2 { pub fn ast(_args: TokenStream, input: TokenStream) -> TokenStream { let input = syn::parse_macro_input!(input as syn::Item); - let repr = match &input { - syn::Item::Enum(enum_) => enum_repr(enum_), - syn::Item::Struct(_) => quote!(#[repr(C)]), + let repr = match input { + syn::Item::Enum(ref enum_) => enum_repr(enum_), + syn::Item::Struct(_) => TokenStream2::default(), _ => { unreachable!()