From 1a2149b0406fd29fa2032532dfba3b371cf74a26 Mon Sep 17 00:00:00 2001 From: Jacob Lifshay Date: Thu, 10 Oct 2024 20:53:29 -0700 Subject: [PATCH] silence warnings for field names that start with _ --- crates/fayalite-proc-macros-impl/src/hdl_bundle.rs | 2 +- crates/fayalite/tests/hdl_types.rs | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/crates/fayalite-proc-macros-impl/src/hdl_bundle.rs b/crates/fayalite-proc-macros-impl/src/hdl_bundle.rs index eefa8be..79326e2 100644 --- a/crates/fayalite-proc-macros-impl/src/hdl_bundle.rs +++ b/crates/fayalite-proc-macros-impl/src/hdl_bundle.rs @@ -340,7 +340,7 @@ impl ToTokens for Builder { })); quote_spanned! {self.ident.span()=> #[automatically_derived] - #[allow(non_camel_case_types, dead_code)] + #[allow(non_camel_case_types, non_snake_case, dead_code)] impl #impl_generics #unfilled_ty #where_clause { diff --git a/crates/fayalite/tests/hdl_types.rs b/crates/fayalite/tests/hdl_types.rs index bd7c0fd..bed1a82 100644 --- a/crates/fayalite/tests/hdl_types.rs +++ b/crates/fayalite/tests/hdl_types.rs @@ -9,8 +9,7 @@ pub struct S { b: UInt<3>, pub(crate) c: ArrayType, Len>, pub d: T2, - pub e: PhantomData, - pub f: PhantomData, + pub _phantom: PhantomData<(T, Len)>, } #[hdl(outline_generated)]